Filystyn Posted January 4, 2017 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 ). 0 Share this post Link to post
Filystyn Posted January 4, 2017 scifista42 said:What do you mean by "catch"? Possibly best would be Death "hit wall" do something here 0 Share this post Link to post
scifista42 Posted January 4, 2017 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. 0 Share this post Link to post
Filystyn Posted January 4, 2017 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 ;-) 0 Share this post Link to post
scifista42 Posted January 4, 2017 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. 0 Share this post Link to post
MaxED Posted January 4, 2017 Filystyn said:How to catch state of death of projectile when it hits wall NOT ACTOR/player/monster? Use appropriate state? 0 Share this post Link to post
scifista42 Posted January 4, 2017 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. 0 Share this post Link to post