Announcement

Collapse
No announcement yet.

Disabling projectile explosion at end of lifespan?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Disabling projectile explosion at end of lifespan?

    How do I disable a projectile's explosion when it reaches the end of its lifespan? (e.g., redeemer rocket and flak shard)

    #2
    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(); 
    	}
    }
    of course, if you only wish to alter the visual effect, damage, damage radius, momentum transfer, rather than disable them entirely, then you can probably do that from here, also. However, all projectiles are a bit unique, so for some you may have to override other functions, like processtouch(). Also, of course you can replace some of these things in the DefaultProperties.

    Comment


      #3
      Wouldn't it be easier to just change the Explosion effect in the default properties to None?

      Comment


        #4
        that should remove the visual effect, yes.

        Comment


          #5
          Originally posted by NickG View Post
          that should remove the visual effect, yes.
          That may be one solution, but if you look at the redeemer rocket in action, you would know that what I'm looking for. When the redeemer rocket hits a wall or a player, it plays its explosion effect, but if it falls out of the world or if it reaches the end of its lifespan, then it simply vanishes without a trace and no explosion of any kind is seen; this is what I'm trying to do with my projectile.

          Comment


            #6
            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


              #7
              It like they cant even read...

              Comment


                #8
                Originally posted by NickG View Post
                It like they cant even read...
                Lol
                Anyway, I tried looking at the projectile's explosion class but nothing changed.

                Comment


                  #9
                  see, it is like you are completely ignoring my suggestion to remove the calls to Explode() and looking for an easy out...

                  Comment


                    #10
                    Id you did not managed to do what you want, try this:
                    Originally posted by NickG View Post
                    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(); 
                        }
                    }
                    of course, if you only wish to alter the visual effect, damage, damage radius, momentum transfer, rather than disable them entirely, then you can probably do that from here, also. However, all projectiles are a bit unique, so for some you may have to override other functions, like processtouch(). Also, of course you can replace some of these things in the DefaultProperties.
                    NickG posted that like, after you created the thread

                    Comment


                      #11
                      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

                      Working...
                      X