void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
SetEntityPlayerInteractCallback("Note_Test3", "ScreenShake", true);
AddEntityCollideCallback("armchair_1", "mansionbase_secret_passage_1", "BreakWall", true, 0);
AddUseItemCallback("", "Hammer", "Woodenblock", "OpenDoor", true);
}
void BreakWall(string &in asParent, string &in asChild, string &in alState)
{
SetPropHealth("mansionbase_secret_passage_1", 0);
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("shelf",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false); }
}
void StopTimer(string &in asTimer)
{
StopPlayerLookAt();
}
void PickNote(string &in asEntity)
{
StartPlayerLookAt("closet_1", 5.0f, 5.0f, "");
AddTimer("StopLookAt", 1.5f, "StopTimer");
PlaySoundAtEntity("", "react_breath.snt", "Player", 0.0f, false);
}
void ScreenShake(string &in asEntity)
{
StartScreenShake(0.4, 0.4, 3, 2.6);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0.0f, false);
}
void OpenDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("WoodenBlock", false, true);
PlaySoundAtEntity("", "unlock_door", "WoodenBlock", 0, false);
RemoveItem("Hammer");
}