Survival Horror elements - Invincible stalking demon

Archive of the old editing forum
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.
Locked
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Survival Horror elements - Invincible stalking demon

Post by Hidden Hands »

I need to program a monster in my game to be invincible and also I need it to be able to KILL the player at the beginning of the game in order to progress to the next level. This is a problem. Because when the monster kills me, I am automatically transported to the beginning of level one again because it thinks I failed.

The idea is that the game starts and you are in a "Silent Hillish" alternate dream state that this creature exists in, and when it kills you it's meant to trigger level 2 - the REAL world - because you wake up from that nightmare and begin the game properly. Can someone help me code this or give me some advice please? Tried doing it several ways, no luck yet.

Thanks in advance.

Also, on a seperate note, how would one go about making a transition between two realities? IE; You're walking around the house all is normal then suddenly - atmosphere changes, music changes, slight alteration to the house seem to be in place and you are in a different parallel universe version of it. If that makes sense. Meant to bring a forboding feeling of terror.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Survival Horror elements - Invincible stalking demon

Post by Matt »

Check the player's health before each attack, and warp to the next map just as it's about to kill the player? Would be more like an actual nightmare what with the "wake up before you hit the ground" effect.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Survival Horror elements - Invincible stalking demon

Post by Hidden Hands »

Vaecrius wrote:Check the player's health before each attack, and warp to the next map just as it's about to kill the player? Would be more like an actual nightmare what with the "wake up before you hit the ground" effect.
So lets say I make players Health 1, and when it reaches this, the player gets warped... how would one go about coding that? Never tried doing something like this in the DOOM engine before.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Survival Horror elements - Invincible stalking demon

Post by Caligari87 »

Well, you'll probably want to give the player this, just to be safe: [wiki]Classes:PowerBuddha[/wiki]. That will ensure the player never acually dies. Then (probably) using ACS in an ENTER [wiki]script_types[/wiki], keep checking the player's health with [wiki]GetActorProperty[/wiki] (in an ENTER script the player is the activator), and when it equals 1, use [wiki]Teleport_NewMap[/wiki] (or maybe [wiki]Exit_Normal[/wiki]) to go to the next level.

There's probably more complex and comprehensive ways of doing it, but this will get the job done well enough.

8-)
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Survival Horror elements - Invincible stalking demon

Post by Nevander »

Caligari87 wrote:There's probably more complex and comprehensive ways of doing it, but this will get the job done well enough.
That's the best way I can think of to do it, but you might want to do some fading and delays and stuff to make it a smooth effect. Default Doom II style of immediately popping up the intermission would clash horribly with this "death" effect script.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Survival Horror elements - Invincible stalking demon

Post by Caligari87 »

Pretty sure Teleport_NewMap skips the transition, and/or I think you can turn off the intermission for a given map in MAPINFO? Been a long time since I've mapped...

8-)
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Survival Horror elements - Invincible stalking demon

Post by Matt »

Do it in ZScript.

Set up the monster's attack so that it rolls its damage immediately before applying it.

Then add a check so that if that number is equal to or greater than the target player's health, it changes the map instead.

(To make things simpler the monster's attacks could be a broad enough range of possible damage levels that you don't need to factor in armour for it to be plausible)
User avatar
Voros
Posts: 151
Joined: Fri Feb 03, 2017 11:47 pm

Re: Survival Horror elements - Invincible stalking demon

Post by Voros »

Am I the only here who gets an SCP-173 vibe from this?
Also, on a seperate note, how would one go about making a transition between two realities? IE; You're walking around the house all is normal then suddenly - atmosphere changes, music changes, slight alteration to the house seem to be in place and you are in a different parallel universe version of it. If that makes sense. Meant to bring a forboding feeling of terror.
If you're talking about custom maps, then you could achieve something like this using Boom's silent teleport IIRC.
User avatar
Kinsie
Posts: 7399
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: Survival Horror elements - Invincible stalking demon

Post by Kinsie »

Voros wrote:If you're talking about custom maps, then you could achieve something like this using Boom's silent teleport IIRC.
Silent teleportation between two areas with similar geometry is how modern AAA games like Dishonored 2 and Titanfall 2 did it for a player-triggered "time-travel" mechanic. So if it sounds hacky to you, it's at least an industry-standard level of hacky. :D

(Those links have spoilers for those games, BTW. Just a heads-up, if you care about that kinda thing)
Locked

Return to “Editing (Archive)”