How do I disable a projectile's explosion when it reaches the end of its lifespan? (e.g., redeemer rocket and flak shard)
Announcement
Collapse
No announcement yet.
Disabling projectile explosion at end of lifespan?
Collapse
X
-
well you may either remove all calls (and inherited calls) to the explode function by overriding the functions which call the function in your projectile class(es), or perhaps you can simply change what the explode function does:
Code:simulated function Explode(vector HitLocation, vector HitNormal) { //do nothing, except still destroy the projectile? if (Ace08WantsToDestroyItYet) { Destroy(); //you may wish to replace this with Shutdown(); } }
-
Originally posted by NickG View Postthat should remove the visual effect, yes.
Comment
-
Oh, wait, I read your first post again, and what you want is to remove the explosion effect after the life time? Well, if the life time ends, it won't do nothing, so it won't explode.
Either way, to do this go to the function that destroys the projectile after the life time ended and make it delete your effect too.
Comment
-
Id you did not managed to do what you want, try this:
Originally posted by NickG View Postwell you may either remove all calls (and inherited calls) to the explode function by overriding the functions which call the function in your projectile class(es), or perhaps you can simply change what the explode function does:
Code:simulated function Explode(vector HitLocation, vector HitNormal) { //do nothing, except still destroy the projectile? if (Ace08WantsToDestroyItYet) { Destroy(); //you may wish to replace this with Shutdown(); } }
Comment
-
well, heres how.
at the Defaultproperties of UTMyProj class, set bSuppressExplosionFX=TRUE.
this should turn off the effect, causing no effect to show when the proj reaches its lifespan
AND ALSO WHEN it hits something.
now override the Explode() function, and have it spawn an emitter. you would wanna include super.Explode(whatever variable in overrided function)
this method is being used in redeemer proj and shockrifle proj combo.
also this would ignore the limits on how many the game renders the proj explosion effects, since the new effect is handled as a class.
Comment
Comment