void OnStart()
{
PlayMusic("01_intro_dark.ogg", false, 1.0f, 1.0f, 0, true);
ShowPlayerCrossHairIcons(false);
FadeOut(0);
SetPlayerActive(false);
PlayMusic("01_intro.ogg", false, 1, 1, 1, false);
SetMessage("Intro", "Girl", 3);
StartScreenShake(0.2, 1, 2, 2);
FadeIn(10);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(5.0f, true);
AddTimer("Fade", 5, "FadeBlack");
}
void FadeBlack(string &in asTimer)
{
FadeImageTrailTo(0, 0);
SetPlayerMoveSpeedMul(0.4);
SetPlayerRunSpeedMul(0.1);
SetPlayerLookSpeedMul(0.3);
FadeRadialBlurTo(1.5, 3);
ShowPlayerCrossHairIcons(true);
SetPlayerActive(true);
}
void OnEnter()
{
SetEntityPlayerLookAtCallback("candle", "First", true);
AddUseItemCallback("", "key_01", "door_01", "UsedKeyOnDoor", true);
SetSwingDoorLocked("door_01", true, true);
}
void First(string &in asEntity, int alState)
{
AddTimer("", 1, "Msg");
}
void Msg(string &in asTimer)
{
StartEffectEmotionFlash("Fade", "First", "");
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
AddTimer("", 2, "Warp");
}
void Warp(string &in asTimer)
{
TeleportPlayer("Warp");
AddTimer("", 15, "Murder");
}
void Murder(string &in asTimer)
{
StartEffectEmotionFlash("Fade", "Second", "");
AddTimer("", 2, "WarpPlayer");
}
void WarpPlayer(string &in asTimer)
{
TeleportPlayer("last");
AddTimer("", 10, "Third");
}
void Third(string &in asTimer)
{
StartEffectEmotionFlash("Fade", "Third", "");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetMessage("Fade", "Last", 3);
FadeOut(0);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
PlaySoundAtEntity("", "unlock_door.snt", "door_01", 0, false);
RemoveItem("key_01");
AddTimer("",4, "Teleport");
}
void Teleport(string &in asTimer)
{
ChangeMap("02_Chapter_01", "PlayerStartArea_1", "", "");
}
------------
it doesn't work still..