Ok sorry
Ill post the whole script
void OnStart()
{
AddUseItemCallback("", "crowbar_guestroom", "mansion_7", "UsedCrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_guestroom_joint", "crowbar1_script", "CollideAreaBreakDoor", true, 1);
AddTimer("", 30, "cry_1_timer");
}
void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar_guestroom");
}
void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "mansion_7", 0, false);
SetEntityActive("crowbar_guestroom_joint", true);
}
void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
AddPlayerSanity(5);
SetSwingDoorLocked("mansion_7", false, true);
AddPropImpulse("mansion_7", 0, 0, -50, "World");
SetSwingDoorDisableAutoClose("mansion_7", true);
SetSwingDoorClosed("mansion_7", false, false);
SetMoveObjectState("mansion_7", 1);
PlaySoundAtEntity("","break_wood_metal", "crowbar1_area", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "crowbar1_area", false);
SetEntityActive("crowbar_guestroom_joint", false);
SetLocalVarInt("Door", 1);
SetEntityActive("crowbar_guestroom_broken", true);
AddTimer("", 1, "girl_scream_timer");
}
///SCARES
void girl_scream_timer(string &in asTimer)
{
PlaySoundAtEntity("", "12_girl_scream", "level_wood_1", 0, false);
AddTimer("", 2, "girl_flee_timer");
}
void girl_flee_timer(string &in asTimer)
{
SetSwingDoorLocked("mansion_5", false, true);
SetSwingDoorDisableAutoClose("mansion_5", true);
AddPropImpulse("mansion_5", 0, 0, 20, "");
AddTimer("", 1, "girl_flee_stop_timer");
}
void girl_flee_stop_timer(string &in asTimer)
{
PlaySoundAtEntity("", "door_level_wood_open", "level_wood_1", 0, false);
SetGlobalVarInt("Cellar", 1);
RemoveTimer("girl_cry");
StopSound("12_girl_cry", 0);
}
///TIMERS
void cry_1_timer(string &in asTimer)
{
PlaySoundAtEntity("", "12_girl_cry", "mansion_5", 0.5f, false);
AddTimer("girl_cry", 40, "cry_1_timer");
}
EDIT: And no it doesn't work
Trying is the first step to success.