Frictional Games Forum (read-only)
Player 'faints' and enters the next map - 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: Player 'faints' and enters the next map (/thread-13049.html)



Player 'faints' and enters the next map - EveryDayImShufflin - 02-02-2012

I am not very good at scripting this game, I don't understand alot of it, though I have tried I can't figure out how to do it, nor can I find a tutorial on this or a script already on the internet

I need a script that when player enters an area named "Trigger_1" he falls to the ground, blacks out and then is changed to another map called "00_Awakened"

You're help will be very much appretiated Big Grin



RE: Player 'feints' and enters the next map - RawkBandMan - 02-03-2012

You could try this:
Put This in your onStart
Code:
AddEntityCollideCallback("Player", "Trigger_1", "Faint", true, 1);

Then put this anywhere else in the script.
Code:
void Faint(string &in asParent, string &in as Child, int alState)
{
FadePlayerRollTo(50, 220, 220);       //Rolls your head to the side
SetPlayerCrouching(true); //Makes the falling down more realistic
FadeOut(5.0f); //This means it will take 5 seconds to fade to black
ChangeMap("00_Awakened", "PlayerStartArea_1", "", "",); //Changes the map
}


Try that....