void OnEnter ()
{
AddEntityCollideCallback("Player", "Wakeupscript", "Wakeupscript", true, 1);
AddEntityCollideCallback("Player", "Levelchange_1", "Levelchange", true, 1);
AddEntityCollideCallback("Player", "NoScare", "NoScare", true, 1);
AddEntityCollideCallback("Player", "SprintDisable", "NoSprint", true, 1);
AddEntityCollideCallback("Player", "SprintEnable", "Sprint", true, 1);
AddEntityCollideCallback("Player", "StandKill", "KillStand", true, 1);
}
void Wakeupscript(string &in asParent, string &in asChild, int alState)
{
SetLanternDisabled(true);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeOut(1.0f);
PlayMusic("Map1Ambiance.ogg", true, 100, 1, 0, false);
FadePlayerRollTo(50, 33, 33);
AddTimer("", 10, "Rollback");
SetPlayerSanity(10);
SetPlayerMoveSpeedMul(0.5);
SetPlayerLookSpeedMul(0.5);
}
void Rollback(string &in asTimer)
{
SetPlayerActive(true);
FadeIn(10.0f);
FadePlayerRollTo(0, 33, 33);
CheckPoint ("Check1", "BridgeDeathRespawn", "BridgeDeath", "DeathHints", "StayLow");
}
void Levelchange(string &in asParent, string &in asChild, int alState)
{
FadeOut(1.0f);
AddTimer("", 1.0f, "Change");
}
void Change(string &in asTimer)
{
ChangeMap("map02.map", "PlayerStartArea_1", "", "");
}
void NoScare(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "03_no.snt", "Levelchange_1", 0, true);
StartPlayerLookAt("Levelchange_1", 2, 2, "");
AddTimer("", 5, "Away");
}
void Away(string &in asTimer)
{
StopPlayerLookAt();
}
void NoSprint(string &in asParent, string &in asChild, int alState)
{
SetPlayerRunSpeedMul(0);
}
void Sprint(string &in asParent, string &in asChild, int alState)
{
SetPlayerRunSpeedMul(1);
GiveSanityBoost();
}
void KillStand(string &in asParent, string &in asChild, int alState)
{
SetPlayerHealth(0);
}
void BridgeDeath(string &in asName, int alCount)
{
SetEntityActive("SprintDisable", true);
SetEntityActive("SprintEnable", true);
SetEntityActive("StandKill", true);
}
void OnLeave ()
{
}