Page 1 of 1

Is there a "common denominator" for all damageable actors?

Posted: Tue Nov 17, 2020 9:06 am
by Kzer-Za
I thought about checking for "health > 0", but I'm not sure this is the right way.

I wanna give all actors that can reasonably expected to be damaged a certain item when they are spawned. I could check

Code: Select all

		if (event.thing is "PlayerPawn" || event.thing.bISMONSTER)
but that would leave out explosive pods, which also can be damaged and destroyed, and later I could add more destructible environment objects. Of course, I could just add all their classes to that condition, but before doing that I thought I should ask. Maybe there is a cover-all solution for all damageable actors.

Re: Is there a "common denominator" for all damageable actor

Posted: Tue Nov 17, 2020 9:10 am
by Jarewill
How about checking the bSHOOTABLE flag?
You could also check if the actor doesn't have the bNODAMAGE flag if you want to leave actors like merchants from Strife out.

Re: Is there a "common denominator" for all damageable actor

Posted: Tue Nov 17, 2020 1:51 pm
by Kzer-Za
Thanks, a combination of bSHOOTABLE and absence of bNODAMAGE sounds like a great idea!

Re: Is there a "common denominator" for all damageable actor

Posted: Tue Nov 17, 2020 1:57 pm
by Arctangent
You might also want to check for bVULNERABLE. It's a pretty infrequent flag, but it nonetheless allows an non-SHOOTABLE actor to be damaged by splash damage.

Re: Is there a "common denominator" for all damageable actor

Posted: Tue Nov 17, 2020 1:58 pm
by Kzer-Za
Thanks!