Jump to content
  • 0

how do i make a projectile that can hurt enemies but not the player?


Jaori_Daevans

Question

I was trying to make a weapon that shoots an explosive projectile.

I know you can add "flags" so the projectile can have different properties

and i was wondering if there is a flag or something to make the explosion of the projectile hurt enemies but not the player who shot it

 

(sorry if my english is not that good)

Edited by Jaori_Daevans

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 1

Here's an example of the stock rocket that doesn't hurt the player.


ACTOR SafeRocket : Rocket
{
  States
  {
  Spawn:
    MISL A 1 Bright
    Loop
  Death:
    MISL B 8 Bright A_Explode(128,128,0) //Here's the change. By setting the flag section to 0 "XF_HURTSOURCE " is disabled
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
  }
}

 

Check this for more details - https://zdoom.org/wiki/A_Explode

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...