Enemy projectile that only hurts enemy ((FIXED))

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Enemy projectile that only hurts enemy ((FIXED))

Post by Niphura »

I wanted to know if it is possible to make a projectile (launched by the enemy) that does not cause damage to the player, but that damages the enemy if the projectile come back to him (using a reflective flag).
i have a shield that use a reflective flag to make bounce enemy projectiles to them (and this cause them damage) but if i'm not using the shield to cover...the projectiles hurt me (and i don't want that)

so...what can i do?
Last edited by Niphura on Tue Feb 05, 2019 7:34 pm, edited 2 times in total.
User avatar
Cherno
Posts: 1337
Joined: Tue Dec 06, 2016 11:25 am

Re: Enemy projectile that only hurts enemy (Question)

Post by Cherno »

Sounds like the easiest way to do this wule be to make the projectile use a custom damage type that only causes harm to enemies and not the player.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Enemy projectile that only hurts enemy (HELP)

Post by Niphura »

I've used damage factor with a custom damage and it worked, thanks :)
Post Reply

Return to “Scripting”