A neat editing trick I accidentally discovered
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- insertwackynamehere
- Posts: 76
- Joined: Wed Mar 10, 2004 8:18 pm
- David Ferstat
- Posts: 1113
- Joined: Wed Jul 16, 2003 8:53 am
- Location: Perth, Western Australia
- Contact:
- EarthQuake
- Posts: 82
- Joined: Fri Dec 19, 2003 9:52 pm
I cannot thank you enough Graf. For months have I been trying to find a way to make players invincible in my ZDaemon rocket jumping wad. ZDaemon's ACS support is almost non-existant, and it's dehacked support is somewhat nullified when online, so any attempts at keeping the player alive just failed.
Thanks to no end for discovering this!
Thanks to no end for discovering this!
- DoomRater
- Posts: 8270
- Joined: Wed Jul 28, 2004 8:21 am
- Preferred Pronouns: He/Him
- Location: WATR HQ
- Contact:
You could achieve the effect by checking the player for a health of 1 in ACS.Chris wrote:Am I the only one that thinks this is a bug that should be fixed? Imagine a windy cliff with a bunch of debris being blown at you, and the level ends when you die/go unconscious.
EDIT: Whoa, I hope I didn't bump something too badly. (didn't look first)
EDIT 2: Tried getting telefragged- no, you don't die from that either. You end up stuck inside the other monster until you kill it though, pretty much the same effect as if you were to spawn on top of another player in Legacy.
- DoomRater
- Posts: 8270
- Joined: Wed Jul 28, 2004 8:21 am
- Preferred Pronouns: He/Him
- Location: WATR HQ
- Contact:
Re: A neat editing trick I accidentally discovered
Just to A_VileRaise this topic from the ashes- would it be possible to isolate the code that causes this interesting behavior and apply it to actors on a case by case basis with a new flag? +DONTKILL or something of that nature...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A neat editing trick I accidentally discovered
There's already the NODAMAGE flag that allows to hurt an actor without it taking any damage. That should be enough.
Re: A neat editing trick I accidentally discovered
No damage is, of course, slightly different. With it, you can't take an enemy down to almost zero HP but not kill it.
However, as an end user solution, it might be possible to set up an enemy to have a check for it's own health in DECORATE, then activate the nodamage flag once it gets to a certain level??? I can see cases of extreme damage getting around that though.
However, as an end user solution, it might be possible to set up an enemy to have a check for it's own health in DECORATE, then activate the nodamage flag once it gets to a certain level??? I can see cases of extreme damage getting around that though.
Re: A neat editing trick I accidentally discovered
You can also modify the Death state. You can completely prevent a death by just jumping it into the Pain state, unless some sort of inventory item exists in the creature's inventory. Once it's there, the death state would occur as normal.
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
Re: A neat editing trick I accidentally discovered
That will just turn them into ghosts. Use RaiseThing(0) in the death stateSoulPriestess wrote:You can also modify the Death state. You can completely prevent a death by just jumping it into the Pain state, unless some sort of inventory item exists in the creature's inventory. Once it's there, the death state would occur as normal.
Re: A neat editing trick I accidentally discovered
Thank you, TDA. Something I had not tested, nor considered. 

- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: A neat editing trick I accidentally discovered
Heh, that's neat
Will this stay as a "feature" in future versions? It would be sad to use it in upcoming maps if future ZDoom versions don't support this anymore.

Re: A neat editing trick I accidentally discovered
Check the date of the original post; if it's been known about for over three years, I don't think it's in any danger of disappearingTormentor667 wrote:Heh, that's neatWill this stay as a "feature" in future versions? It would be sad to use it in upcoming maps if future ZDoom versions don't support this anymore.

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A neat editing trick I accidentally discovered
This can't disappear because it would change the way the Boom sector flags work. Admittedly it is in fact a bug - but one of the kind that can't be fixed for compatibility.
Re: A neat editing trick I accidentally discovered
Better for some situations: once you activate the NODAMAGE flag, explicitly set the target's health to 1. It's still not exactly the same, because it doesn't cover the case of a monster that should have only been damaged enough to have half health before NODAMAGE was shut off... but it does solve the high-damage kill. You could get really fancy and spawn a secondary, invisible object and use it to keep track of the amount of damage that should be done to the target, and then apply that amount of damage (down to a minimum target health of 1) when the NODAMAGE flag is removed.Enjay wrote:No damage is, of course, slightly different. With it, you can't take an enemy down to almost zero HP but not kill it.
However, as an end user solution, it might be possible to set up an enemy to have a check for it's own health in DECORATE, then activate the nodamage flag once it gets to a certain level??? I can see cases of extreme damage getting around that though.
- DoomRater
- Posts: 8270
- Joined: Wed Jul 28, 2004 8:21 am
- Preferred Pronouns: He/Him
- Location: WATR HQ
- Contact:
Re: A neat editing trick I accidentally discovered
Yeah, the reason this behavior would be awesome is so that I could have enemy boxers that can be knocked out without actually killing them, and would also allow for a boxing mod that wouldn't be dependent on a map (though I suppose in practice that doesn't make sense). It's all stuff easily emulated through other means. Actually having the player boxers kill each other in a normal deathmatch map would make sense, too.