void OnStart()
{
AddEntityCollideCallback("Player", "GraveArea_1", "Grave1", true, 1);
AddEntityCollideCallback("Player", "GraveArea_2", "Grave2", true, 1);
AddEntityCollideCallback("Player", "GraveArea_3", "Grave3", true, 1);
AddEntityCollideCallback("Player", "GraveArea_4", "Grave4", true, 1);
SetLocalVarInt("Var1", 0);
SetEntityPlayerLookAtCallback("GraceAreaCorpse_1", "CorpseDisappear1", true);
SetEntityPlayerLookAtCallback("GraceAreaCorpse_2", "CorpseDisappear2", true);
}
void Grave1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("GraceAreaCorpse_1", true);
AddLocalVarInt("Var1", 1);
func5();
}
void Grave2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("GraceAreaCorpse_2", true);
AddLocalVarInt("Var1", 1);
func5();
}
void Grave3(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var1", 1);
func5();
}
void Grave4(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var1", 1);
func5();
}
void func5()
{
if(GetLocalVarInt("Var1") == 4)
{
SetEntityActive("coffin_dirty_3", true);
SetEntityActive("Flask_03", true);
}
}
void CorpseDisappear1(string &in asEntity, int alState)
{
if (alState == 1)
{
SetPropActiveAndFade("graveyard_corpse03_1", false, 0.5f);
StartScreenShake(0.1f, 0, 0.1, 0.1);
PlayGuiSound("sanity_flick.snt", 0.5f);
PlayGuiSound("scare_wall_scratch_single.snt", 1);
PlayGuiSound("react_breath.snt", 1);
}
}
void CorpseDisappear2(string &in asEntity, int alState)
{
if (alState == 1)
{
SetPropActiveAndFade("graveyard_corpse02_1", false, 0.5f);
StartScreenShake(0.1f, 0, 0.1, 0.1);
PlayGuiSound("sanity_flick.snt", 0.5f);
PlayGuiSound("scare_wall_scratch_single.snt", 1);
PlayGuiSound("react_breath.snt", 1);
}
}
///Graveyard End///