[Fixed] Killing yourself in E1M8's death chamber [.96]
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
[Lock up] Killing yourself in E1M8's death chamber [.96]
This is probably one of those "don't do it" scenarios, but it caused my computer to lock.
Go to E1M8. Go to the last room (where you have to die) and then type kill. The game should completely lock up, leaving you to ctrl-alt-delete to escape.
You probably aren't supposed to die in there, so maybe that's why it locks.
Go to E1M8. Go to the last room (where you have to die) and then type kill. The game should completely lock up, leaving you to ctrl-alt-delete to escape.
You probably aren't supposed to die in there, so maybe that's why it locks.
So how'd you fix it? I assume by changing cht_Suicide so that if the player is in such a sector it takes him to 1 point of health instead of killing him?
BTW, a sector type of "Player Can't Die" might be a nice addition to the game. It would be exactly like this sector type but wouldn't do damage to the player and wouldn't trigger a special event (unless you wanted it to?) when the player hit 1% health.
BTW, a sector type of "Player Can't Die" might be a nice addition to the game. It would be exactly like this sector type but wouldn't do damage to the player and wouldn't trigger a special event (unless you wanted it to?) when the player hit 1% health.
If the "Player Can't Die" sector was added, you could then just have a looping script that watches the player's health and does something special when it's equal to 1%. Trigger the script when the player enters the sector in question, and kill it when he leaves, and you've got a completely customizable version of the E1M8 death sector special. 

- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
You can do the same with an actor thing, as well. Give the sector a normal damage special, put one of those things in that calls a script (or the endlevel special directly), and voila. If you still want the player to die, make the script remove the thing, kill the player, and optionally respawn it.If the "Player Can't Die" sector was added, you could then just have a looping script that watches the player's health and does something special when it's equal to 1%. Trigger the script when the player enters the sector in question, and kill it when he leaves, and you've got a completely customizable version of the E1M8 death sector special.
I don't think you understand. The sector type would PREVENT the player from dying, it wouldn't attempt to MAKE them die. In other words, you could stand in the sector and get your ass kicked by a cyberdemon, 4 spiderdemons, and 17 cacos, and so long as you remain in the sector your health would never drop below 1%. This could be used for some interesting gameplay effects.
Examples:
1) Think of every console game you've played in which you have some epic battle early on and are meant to get your ass handed to you. When your health hits 1%, you could trigger a script to run the appropriate (friend comes to save you/enemy taunts you and leaves/whatever) cutscene and continue you on your merry way. The sector special would prevent the player from dying accidentally.
2) Custom death. Don't like the way the player dies? Script your own! Death sequences could be different depending on where (and possibly how) the player "dies".
Examples:
1) Think of every console game you've played in which you have some epic battle early on and are meant to get your ass handed to you. When your health hits 1%, you could trigger a script to run the appropriate (friend comes to save you/enemy taunts you and leaves/whatever) cutscene and continue you on your merry way. The sector special would prevent the player from dying accidentally.
2) Custom death. Don't like the way the player dies? Script your own! Death sequences could be different depending on where (and possibly how) the player "dies".
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Yeah, the same with the thing. The sector the thing is in wouldn't actively try to kill the player, but it would prevent the player's health from going below 1%. Plus, when your health *tries* to go below 1% (but it wouldn't succeed in doing so), it activates its special.The sector type would PREVENT the player from dying, it wouldn't attempt to MAKE them die. In other words, you could stand in the sector and get your ass kicked by a cyberdemon, 4 spiderdemons, and 17 cacos, and so long as you remain in the sector your health would never drop below 1%. This could be used for some interesting gameplay effects.
But, you could use that thing with an end-level special in conjunction with a normal damaging sector type to emulate the end of E1M8.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Chris wrote:Yeah, the same with the thing. The sector the thing is in wouldn't actively try to kill the player, but it would prevent the player's health from going below 1%. Plus, when your health *tries* to go below 1% (but it wouldn't succeed in doing so), it activates its special.The sector type would PREVENT the player from dying, it wouldn't attempt to MAKE them die. In other words, you could stand in the sector and get your ass kicked by a cyberdemon, 4 spiderdemons, and 17 cacos, and so long as you remain in the sector your health would never drop below 1%. This could be used for some interesting gameplay effects.
But, you could use that thing with an end-level special in conjunction with a normal damaging sector type to emulate the end of E1M8.
No, it would not. One rocket blast and the player is toast, no matter how much scripting you use to prevent it. The special E1M8 sector actively prevents the player from dying at all while he is in it.
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
The new thing would cause the sector to behave, partially, as that E1M8 special sector.. except it doesn't actively hurt the player and it calls the thing's special instead of implicitly ending the level. If a player has 2% health and takes a rocket right in the face, the thing's special would be called, and if the thing still existed after the special, his health would not go below 1% (this so if the script the thing calls removes the "Protect Player In Sector" object as one of the first things, he could still be killed if the modder wants that). This isn't a scripting trick, this would be a new object ZDoom would explicitly have coded in.No, it would not. One rocket blast and the player is toast, no matter how much scripting you use to prevent it.
Putting in one of these special things into a sector would do the same.The special E1M8 sector actively prevents the player from dying at all while he is in it.