void OnStart()
{
AddEntityCollideCallback("Player", "Scare_1", "StartShaking", true, 1);
}
void StartShaking(string &in asParent, string &in asChild, int alState)
{
SetPlayerMoveSpeedMul(0.35);
SetPlayerRunSpeedMul(0);
SetPlayerLookSpeedMul(0.5);
GiveSanityDamage(25.0f, true);
PlayGuiSound("guardian_ontop3.ogg", 0.5f);
StartScreenShake( 0.2f, 1.1f, 0.2f, 8.5f);
CreateParticleSystemAtEntity("", "ps_cave_monster_breath.ps", "Ghost_1", true);
CreateParticleSystemAtEntity("", "ps_cave_monster_breath.ps", "Ghost_2", true);
AddTimer("", 0.7, "scared");
}
void scared(string &in asTimer)
{
SetEntityActive("skull_1", false);
SetEntityActive("skull_2", true);
AddTimer("", 8.5, "scared2");
}
void scared2(string &in asTimer)
{
SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
SetPlayerLookSpeedMul(1);
ChangePlayerStateToNormal();
SetPlayerActive(true);
}