[Fixed] Killing yourself in E1M8's death chamber [.96]

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Fixed] Killing yourself in E1M8's death chamber [.96]

by Enjay » Sun Jan 30, 2005 2:07 pm

HotWax wrote:Wouldn't that be just swell?
:thumb:

by HotWax » Sun Jan 30, 2005 2:05 pm

Now imagine if you could do that same scene but have the actual enemies kick the shit out of the player instead of the sector damaging them for no good reason. And imagine that instead of exitting the level, you could have the special execute a script for you when the player hits 1% health. Then you could display some spiffy "Player gets knocked out and dragged off" type cutscene. Wouldn't that be just swell?

by Enjay » Sun Jan 30, 2005 1:32 pm

I didn't know that the sector type actually prevented you from dying. I have a level where you get ambushed and appear in a prison cell at the start of the next level. I use the E1M8 sector special to simulate the ambush but wondered why I never actually ended up dead even when being damaged by the sector and a bunch of enemies. I'm glad it is this way, however, as this is just the effect I was looking for when I made the level.

by Graf Zahl » Sun Jan 30, 2005 6:57 am

Yes, that's logical. What I wanted to say is that you can't achieve this effect with scripting alone.

by Chris » Sun Jan 30, 2005 4:32 am

No, it would not. One rocket blast and the player is toast, no matter how much scripting you use to prevent it.
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.
The special E1M8 sector actively prevents the player from dying at all while he is in it.
Putting in one of these special things into a sector would do the same.

by Graf Zahl » Sun Jan 30, 2005 4:21 am

Chris wrote:
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.
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.

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.

by HotWax » Sun Jan 30, 2005 1:24 am

Hmmm, I see what you mean. OK, we'll go with that suggestion. :P

by Chris » Sat Jan 29, 2005 9:28 pm

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.
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.

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.

by HotWax » Sat Jan 29, 2005 9:17 pm

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".

by Chris » Sat Jan 29, 2005 8:28 pm

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.
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.

by HotWax » Sat Jan 29, 2005 8:01 pm

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. :)

by Chris » Sat Jan 29, 2005 7:46 pm

Perhaps a thing that, when placed in a sector, would execute its special when the player's health would reach 0 within that sector?

by HotWax » Sat Jan 29, 2005 6:45 pm

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.

by randi » Sat Jan 29, 2005 6:21 pm

You could say that this sector lets the player have a near-death experience. :-)

by Graf Zahl » Sat Jan 29, 2005 6:02 pm

A classic endless loop. The sector doesn't allow the player to die and the function cht_Suicide tries to kill the player until he is dead (which he never will be in this special sector!)


EDIT: (too late again! :()

Top