+WOUNDONCE, or +ALREADYWOUNDED

Moderator: GZDoom Developers

Post Reply
D2JK
Posts: 543
Joined: Sat Aug 30, 2014 8:21 am

+WOUNDONCE, or +ALREADYWOUNDED

Post by D2JK »

Currently, after a monster's health dips below WoundHealth, the Wound state will be entered each and every time you damage the monster from there on, it seems. I think this is a problem as it not only becomes easy to stunlock the monster, but it will also interrupt any lengthy actions underway. In my opinion, a flag such as +WOUNDONCE could be implemented so that this can optionally be limited into a one time event, which, to me, would be infinitely more useful.

Alternatively, the flag could be named +ALREADYWOUNDED. If present, the monster won't enter the Wound state again, and any current actions will not be interrupted either. This flag could be cleared on death, raise or respawn.
User avatar
NeuralStunner
 
 
Posts: 12326
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: +WOUNDONCE, or +ALREADYWOUNDED

Post by NeuralStunner »

It seems trivial to add some check of your own.

In any case, this would make more sense as an actual counter. (So, a WoundCount property.)
D2JK
Posts: 543
Joined: Sat Aug 30, 2014 8:21 am

Re: +WOUNDONCE, or +ALREADYWOUNDED

Post by D2JK »

It seems trivial to add some check of your own.
I don't think it is. Remember that the goal is to have the wound effect* 1) trigger instantly, 2) only once, and 3) not interrupt any actions after it has already triggered once. If this custom inventory or health check you suggest is in the wound state, you already might have interrupted another action, at which point it doesn't matter much even if you make the second visit in the Wound state last for zero tics; it will look strange when the monster is shot using rapid fire weapons. A health check outside the Wound state? This would require too many JumpIf's littered around most states to be practical. A dedicated health monitoring script running in the background, for each monster? No.

* Whatever is in the Wound state.

As for the WoundCount property: could work too, why not, provided the counter also resets upon death. Otherwise, it should be possible to do that manually.
User avatar
NeuralStunner
 
 
Posts: 12326
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: +WOUNDONCE, or +ALREADYWOUNDED

Post by NeuralStunner »

Sorry, I misremembered the actual behavior, thinking it simply replaced the normal Pain state at low health values.

Of note: Since it's possible to [wiki=A_SetPainThreshold]change PainThreshold dynamically[/wiki], it seems sensible to have one to set WoundHealth as well. In that case, one could set it to 0 immediately from the Wound state and achieve a similar effect... I won't say that's a perfect alternative to a WoundCount property, but it would probably be more general-use.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: +WOUNDONCE, or +ALREADYWOUNDED

Post by Graf Zahl »

Changing the logic is not feasible. What I just did is make WoundHealth modifiable, so you can tinker with this value directly when entering the Wound state.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”