Ask questions, discuss ideas, get answers
Swaffy
Posts: 1715 Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas
Post
by Swaffy » Fri Aug 30, 2013 6:58 pm
I think it would be safer to use -2000 or -1000 for the explosion force, -9999 would be overkill.
[Edit] I found the code.
Code: Select all
rem *** BlackHolemisile ***
ObjectTemplate.create Projectile BlackHolemisile
ObjectTemplate.createNotInGrid 1
ObjectTemplate.loadSoundScript ../air/common/Sounds/Bomb.ssc
ObjectTemplate.geometry Big_Bomb_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.timeToLive CRD_NONE/6/0/0
ObjectTemplate.damageType 1
ObjectTemplate.material 263
ObjectTemplate.material2 264
ObjectTemplate.radius 30
ObjectTemplate.stopAtEndEffect 1
ObjectTemplate.dieAfterColl 0
ObjectTemplate.hasCollisionEffect 1
ObjectTemplate.mass 250
ObjectTemplate.drag 0.08
ObjectTemplate.setHasPointPhysics 0
rem ObjectTemplate.YModOnExplosion 400.0
rem bjectTemplate.ProximityFusePrimer 0.1
ObjectTemplate.ForceOnExplosion -20000
ObjectTemplate.hasCollisionEffect 1
ObjectTemplate.addTemplate e_warptrail2
ObjectTemplate.setRotation 90/0/90
ObjectTemplate.addTemplate e_warptrail222
ObjectTemplate.setRotation -90/0/90
rem -------------------------------------------------
ObjectTemplate.addTemplate Bomb_wing
ObjectTemplate.setPosition 0/0/-0.5
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/0/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/0/-1
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/0.3/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/-0.3/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0.3/0/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition -0.3/0/-4
ObjectTemplate.addTemplate Bomb_wing
ObjectTemplate.setPosition 0/0/-0.5
ObjectTemplate.setRotation 0/0/-90
rem -------------------------------------------------
(Forum Thread |Download) Swaffy'sMod v0.34 | Download link to come Soon™
Vilespring
Posts: 740 Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States
Post
by Vilespring » Fri Aug 30, 2013 7:46 pm
I'm just trying to get it to move to see if the concept works. If the thing disappears, well, I'm getting some were XD
Swaffy
Posts: 1715 Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas
Post
by Swaffy » Sat Aug 31, 2013 7:59 am
Okay. Try taking the code from your ordinary shells and begin with the blast radius and the blast pressure (forceOnExplosion) code to see if that works. If it does, then work with the code to make it what you want.
[EDIT] Wait, if you said the target object disappeared then try to reduce the explosion force. If it's disappearing, it might just be traveling too fast. Keep halving the explosion force number until you get close to what you want.
(Forum Thread |Download) Swaffy'sMod v0.34 | Download link to come Soon™
Vilespring
Posts: 740 Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States
Post
by Vilespring » Sat Aug 31, 2013 4:01 pm
That is right. I just cannot get it to move.
Swaffy
Posts: 1715 Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas
Post
by Swaffy » Sat Aug 31, 2013 6:21 pm
Double-check this line of code:
Objects.rfa/Objects/Soldiers/Common/CommonSoldierData.inc
ObjectTemplate.explosionForceMax 200
(Forum Thread |Download) Swaffy'sMod v0.34 | Download link to come Soon™
Vilespring
Posts: 740 Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States
Post
by Vilespring » Sat Aug 31, 2013 6:30 pm
I'm trying to move vehicles, not infantry. The vehicles are making shuffle sounds, then explode, because they take some damage somehow.
freddy
Posts: 1267 Joined: Sun Oct 18, 2009 4:58 pm
Post
by freddy » Sun Sep 01, 2013 12:24 am
the material2 must be able to hurt the vehicle even the tinyest amount or nothing happens, this example code works on planes and jeeps but not on tanks (regular bf42). i used the coltprojectilematerial2. you have to find or make a own material that works on the vehicles you want to use it on.
example code
Code: Select all
ObjectTemplate.Active Thompson
ObjectTemplate.magSize -1
ObjectTemplate.reloadtime 0
Code: Select all
ObjectTemplate.Active ThomsonProjectile
ObjectTemplate.ForceOnExplosion -200
ObjectTemplate.material 70
ObjectTemplate.material2 214
ObjectTemplate.radius 15
ObjectTemplate.damageType 1
the vehicles is pulled to the center of the explosion so you cant shot straight on the target, you must aim where you want it to move
Vilespring
Posts: 740 Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States
Post
by Vilespring » Sun Sep 01, 2013 4:25 am
Have you tested this code? I tried it and it does not work.
Swaffy
Posts: 1715 Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas
Post
by Swaffy » Sun Sep 01, 2013 4:36 am
freddy wrote: the vehicles is pulled to the center of the explosion so you cant shot straight on the target, you must aim where you want it to move
But if it explodes mid-air next to the vehicle (without touching), won't it pull the vehicle?
(Forum Thread |Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267 Joined: Sun Oct 18, 2009 4:58 pm
Post
by freddy » Sun Sep 01, 2013 5:12 am
Vilespring wrote: Have you tested this code? I tried it and it does not work.
did you run it in vanilla bf42?
extended test code
Code: Select all
ObjectTemplate.Active Thompson
ObjectTemplate.magSize -1
ObjectTemplate.reloadtime 0
ObjectTemplate.setTracerTemplate AA_Allies_Projectile CRD_NONE/1/0/0
Code: Select all
ObjectTemplate.Active ThomsonProjectile
ObjectTemplate.ForceOnExplosion -999
ObjectTemplate.material 70
ObjectTemplate.material2 214
ObjectTemplate.radius 15
ObjectTemplate.damageType 1
ObjectTemplate.Active AA_Allies_Projectile
ObjectTemplate.ForceOnExplosion -999
ObjectTemplate.material 70
ObjectTemplate.material2 214
looks like this