Frictional Games Forum (read-only)
switch map after death ? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: switch map after death ? (/thread-6132.html)



switch map after death ? - sassix - 01-09-2011

hey, is there a way to switch the map after death ?
at the end of my map enemys killing me but instead of being dead i wanna swap the map cuz the first map is just a dream.


Quote:void Collide_Area(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2" , true);
SetEntityActive("servant_grunt_1" , true);
SetEntityActive("servant_brute_1" , true);
FadeIn(20);
}

this is the end of my first map script, it should be fade out after enemy killed me and loading the next map.


RE: switch map after death ? - TheLittleGarfield - 01-09-2011

Use the script from near the end of the game, when you get captured by two brutes.


RE: switch map after death ? - sassix - 01-09-2011

(01-09-2011, 09:38 PM)TheLittleGarfield Wrote: Use the script from near the end of the game, when you get captured by two brutes.
y sry i asked the wrong question, i want them to kill me first, it should load the map AFTER im gettin down, not while theyre appear

Quote:void Collide_Area(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2" , true);
SetEntityActive("servant_grunt_1" , true);
SetEntityActive("servant_brute_1" , true);
FadeIn(20);
"bla bla player is dead script" then change map
ChangeMap("Castle Enter.map", "PlayerSpawn1", "", "");
}

thats what i mean Tongue


RE: switch map after death ? - DIGI Byte - 01-10-2011

actually they don't kill you in the original script, they fake it.
copy what they did, but have it detect the players health
and when its lower then 1, change maps and set the health too 60


RE: switch map after death ? - sassix - 01-10-2011

(01-10-2011, 09:45 AM)DIGI Byte Wrote: actually they don't kill you in the original script, they fake it.
copy what they did, but have it detect the players health
and when its lower then 1, change maps and set the health too 60

sry i dont understand the last 2 rows :S
and what do u mean with " they fake it in this script" ?


RE: switch map after death ? - Elven - 08-22-2011

basically Player didn't really die. They scripted it as like he died ^^.

Edit: // Ouch, I dug old thread up xD. I guess I was searching for help and then when later came I was "Oh, that dude needs help" Tongue. My mistake.


RE: switch map after death ? - Rapture - 08-22-2011

Could this be valid?

Code:
//Parameters can be whatever triggers the checkpoint. This one is from a "AddEntityCollideCallback".
void Example(string &in asParent, string &in asChild, int alState)
{
CheckPoint("ExampleInternalName","ExampleStartPos", "ExampleScriptCallback", "Hints", "Example_CheckPoint");
}

void CheckPoint1Script(string &in asName, int alCount)
{
ChangeMap("Example.map", "ExampleStartPos", "", "");
}