Actor having both +INVULNERABLE and +NODAMAGE flags can enter Pain state

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!)
Posts: 2
Joined: Wed Dec 27, 2023 8:59 am
Preferred Pronouns: He/Him

Actor having both +INVULNERABLE and +NODAMAGE flags can enter Pain state

Post by Mozart27 »

According to Zdoom Wiki, actor having +INVULNERABLE flags will never enter its Pain state. However when I set both +INVULNERABLE and +NODAMAGE flags, it can enter Pain state whenever I damage it (the puff and projectile don't have +FOILINVUL flag). Is this intentional or bug? I use GZDoom 4.11.3

This is what Zdoom Wiki describes:

And here is DECORATE code

Code: Select all

actor undead: DoomImp
	+NODAMAGE //If this flag is not set, the actor never feels pain. But if it is set, the monster enter Pain state all the time.
	PainChance 256
User avatar
Jekyll Grim Payne
Posts: 1078
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

Re: Actor having both +INVULNERABLE and +NODAMAGE flags can enter Pain state

Post by Jekyll Grim Payne »

That most likely means that NODAMAGE takes precedence over INVULNERABLE (which would make sense, because it provides a higher degree of protection), and NODAMAGE has no effect on painchance. You can combine NODAMAGE with NOPAIN to get absolute protection and disable pain.

Return to “Scripting”