void OnStart()
{
AddUseItemCallback("", "key_intro", "intro_door", "UseKeyOnDoor", true);
SetInventoryDisabled(true);
SetPlayerActive(false);
GiveSanityDamage(100, false);
FadeOut(0.1);
AddQuest("memento2", "memento2");
void InteractPassage(string &in asEntity);
{
int interactCount = GetLocalVarInt("HitCount");
AddLocalVarInt("HitCount", 1);
AddTimer("", 0.5, "DecreaseHitCount");
if (interactCount == 1)
{
SetPropHealth("BreakableJar", 0);
}
if (GetTimerTimeLeft("limitsound") == 0)
{
AddTimer("limitsound", 0.5, "");
PlayGuiSound("impact_glass.ogg", 1);
PlayGuiSound("break_glass_bottle1", 1);
}
}
void VoiceDone ()
{
SetPlayerSanity(70);
SetInventoryDisabled(false);
SetPlayerActive(true);
FadeIn(3);
AddEntityCollideCallback("Player", "AreaMemento", "EventQuest", true, 1);
AddEntityCollideCallback("Player", "AreaMemento_2", "AcidQuest", true, 1);
AddUseItemCallback("", "acido1", "organico1", "Dissolve", true);
}
void Dissolve (string &in asItem, string &in asEntity)
{
SetPropActiveAndFade("organico1", false, 3);
PreloadSound("puzzle_acid.snt");
CompleteQuest("memento2", "memento2");
}
void DecreaseHitCount(string &in asTimer)
{
AddLocalVarInt("HitCount", -1);
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("intro_door", false, true);
PlaySoundAtEntity("Unlock_door", "unlock_door.snt", "intro_door", 0, false);
RemoveItem("intro_key");
}
void PickUpLantern(string &in asEntity, string &in type)
{
AddQuest("lantern", "pickuplantern");
}
void EventQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("area", "memento1");
}
void OnEnter()
{
PlayMusic("04_amb.ogg", true, 1, 15, 1, true);
}
void OnLeave()
{
StopMusic(2, 1);
CompleteQuest("lantern", "pickuplantern");
}