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.
Survival Horror elements - Invincible stalking demon
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.
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
- 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
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.
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: Survival Horror elements - Invincible stalking demon
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.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.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Survival Horror elements - Invincible stalking demon
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.
There's probably more complex and comprehensive ways of doing it, but this will get the job done well enough.
Re: Survival Horror elements - Invincible stalking demon
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.Caligari87 wrote:There's probably more complex and comprehensive ways of doing it, but this will get the job done well enough.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Survival Horror elements - Invincible stalking demon
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...
- 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
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)
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)
Re: Survival Horror elements - Invincible stalking demon
Am I the only here who gets an SCP-173 vibe from this?
If you're talking about custom maps, then you could achieve something like this using Boom's silent teleport IIRC.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.
- 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
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.Voros wrote:If you're talking about custom maps, then you could achieve something like this using Boom's silent teleport IIRC.
(Those links have spoilers for those games, BTW. Just a heads-up, if you care about that kinda thing)