Rockets: nothing happens on impact (sometimes)

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Rockets: nothing happens on impact (sometimes)

Post by Swaffy »

Sometimes, my rockets (the projectile I use for my Mi24D and AH-6 helicopters) don't explode or do damage when they hit their target. What could be causing this issue? I checked the FireArms to see if it's a networkInfo problem, but they have the correct networkInfo. Could it be "setHasPointPhysics 0"?

Weapons.con

Code: Select all

ObjectTemplate.create Projectile RPS2
ObjectTemplate.geometry projectile_m1
ObjectTemplate.timeToLive CRD_NONE/8/0/0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.setHasPointPhysics 0
ObjectTemplate.drag 1
ObjectTemplate.mass 5
ObjectTemplate.startEffectTemplate e_HydraSmoke
ObjectTemplate.hasCollisionEffect 1
ObjectTemplate.hasOnTimeEffect 0
ObjectTemplate.invisibleAtEndEffect 0
ObjectTemplate.dieAfterColl 1
ObjectTemplate.stopAtEndEffect 0
ObjectTemplate.invisible 0
ObjectTemplate.damageType 1

ObjectTemplate.material 226
ObjectTemplate.material2 200

ObjectTemplate.radius 8
ObjectTemplate.ProximityFusePrimer 0.25
ObjectTemplate.explodeNearEnemyDistance 8
ObjectTemplate.ForceOnExplosion 1
ObjectTemplate.gravityModifier 0

ObjectTemplate.addTemplate KatyushaRocket_Wing
ObjectTemplate.setPosition 0/0/-1.5
ObjectTemplate.setRotation 0/0/0

ObjectTemplate.addTemplate RPS2_RocketEngine
ObjectTemplate.setPosition 0/0/-2
ObjectTemplate.setRotation 0/0/0
Physics.con

Code: Select all

ObjectTemplate.create Engine RPS2_RocketEngine
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.setMinRotation 0/0/0
ObjectTemplate.setMaxRotation 0/0/5000
ObjectTemplate.setMaxSpeed 0/0/100000
ObjectTemplate.setAcceleration 0/0/100000
ObjectTemplate.setInputToRoll c_PIThrottle
ObjectTemplate.setEngineType c_ETRocket
ObjectTemplate.setTorque 150.0
ObjectTemplate.setNoPropellerEffectAtSpeed 1000
ObjectTemplate.setDifferential 90.0

rem *** Rocket engine sound ***
rem ObjectTemplate.loadSoundScript Sounds/AT2_rkt.ssc
ObjectTemplate.loadSoundScript ..\..\..\common\Sounds\bazookaprojectile.ssc
Could it be that the engine doesn't have a networkInfo? I might not even be on the right track... :(
Last edited by Swaffy on Sat Feb 09, 2013 4:51 pm, edited 1 time in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Rockets: nothing happens on impact (sometimes)

Post by freddy »

Youtube lags like stink here for the moment, but from what i could see it looks like there is something missing in the damage materials system. Witch is a bit weird as it seems you are using the Bazooka projectile settings.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Rockets: nothing happens on impact (sometimes)

Post by Swaffy »

Yes sir. I am using the Bazooka materials. I think the most I did to that damageSystem is alter the damage variables.

So that led me to thinking it's something in the coding. As you see, this projectile isn't a basic projectile code. I copied then altered this code from somewhere a long time ago.

[Edit] I'm going to rem the wing and engine. I'm curious if it's the engine. I created this projectile before I knew about the "addRootSpeed 0" code and was trying to figure out how to make the rocket go straight instead of following the vehicle. So the wing is not needed and I doubt the engine is needed because so many rockets are fired at once.

[Edit] Solved. Why is it that I find the issue after I create a thread? Such a waste.

ObjectTemplate.ProximityFusePrimer 0.25
ObjectTemplate.explodeNearEnemyDistance 8

These were the issue.

I'm still going to leave out the engine and wing because they're really not needed.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply