Page 1 of 1

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

Posted: Wed Dec 27, 2023 9:29 am
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:
https://zdoom.org/wiki/Actor_flags#INVULNERABLE
https://zdoom.org/wiki/Actor_flags#NODAMAGE

And here is DECORATE code

Code: Select all

actor undead: DoomImp
{
	+INVULNERABLE
	+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
}

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

Posted: Thu Jan 11, 2024 4:12 am
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.