Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Filystyn

How do i catch death on wall

Recommended Posts

How to catch state of death of projectile when it hits wall NOT ACTOR/player/monster?
Idea: Try to do some hack with decals ( never played with decals before ).

Share this post


Link to post

What about making the projectile bouncing + giving it a USEBOUNCESTATE flag and Bounce.Wall state? If you didn't want the projectile to actually bounce, you'd write the code within the Bounce.Wall state to stop and destroy the projectile or whatever.

http://zdoom.org/wiki/Actor_states#Bounce

EDIT: Possibly a better idea from the same zdoom wiki page: It seems that if a projectile defines Death, XDeath and Crash states, it will enter Death state when hitting a wall, XDeath state when hitting a bleeding actor, and Crash state when hitting a non-bleeding actor - so, define all of the states and use the Death one for your special behavior. Unlike the Bounce state, this won't distinguish between walls and floors + ceilings, though.

Share this post


Link to post
scifista42 said:

What about making the projectile bouncing + giving it a USEBOUNCESTATE flag and Bounce.Wall state? If you didn't want the projectile to actually bounce, you'd write the code within the Bounce.Wall state to stop and destroy the projectile or whatever.

http://zdoom.org/wiki/Actor_states#Bounce

EDIT: Possibly a better idea from the same zdoom wiki page: It seems that if a projectile defines Death, XDeath and Crash states, it will enter Death state when hitting a wall, XDeath state when hitting a bleeding actor, and Crash state when hitting a non-bleeding actor - so, define all of the states and use the Death one for your special behavior.


Great idea :).

Thank you very much.

One more question is it possible to actually tell actor monster to move forward vide walk forward? Or is this only possible with CHF_NODIRECTIONTURN flag that is zdoom development atm ? ( I huess some hack with friction and give velocity would be needed ). I will wait for the flag tho ;-)

Share this post


Link to post

Why would you wait if you can download and use the development version right now? :)

A hack with velocity would work, but a clean feature should be a preferable option.

By the way, don't quote a whole post just above yours, unless you cut out parts of it to address only a specific part. It does nothing but increase size of your post.

Share this post


Link to post

I wonder why those death types don't match all possibilities, which even the bounce types do - collisions with walls should distinguish between collisions with linedefs, with floors and with ceilings.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×