Jump to content
  • 0

Make a projectile not explode when hitting an enemy


adasiok

Question

Hello,

I'm working on an RG14 Hand Grenade lately and came to a problem, how can i make the grenade not explode immediately after hitting the enemy but rather bounce off it and explode after a short amount of time?

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 1

Sending a projectile to its death state on collision is hardcoded behavior of the Doom engine. ZDoom allows you to choose however a different state depending on what the projectile collided with, so you could define this bounce, wait, and explode behavior in the XDeath and Crash states. If you're not targeting ZDoom, it is going to be more difficult. You could contrive to let the grenade die normally but spawn another (technically different) grenade that will fall down, wait, and explode; this should be doable with MBF21 and perhaps even with just plain DEHACKED depending on what you can sacrifice for the effect.

Share this post


Link to post
  • 1

You might want some bouncing happening with the appropriate flags, in you case, you need ALLOWBOUNCEONACTORS and of course BOUNCEONACTORS other than just the BounceType property

Share this post


Link to post
  • 1

If you're using DECORATE, you'll want to get rid of the "PROJECTILE" flag.  That is a collection of other flags, some which cause the projectile to jump to its "Death" state when it collides with walls/floors.

Take a look at the PROJECTILE flag in the ZDOOM wiki so you know what you know exactly what it does, and what you may need to add if PROJECTILE is removed.
https://zdoom.org/wiki/Projectile

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...