void OnStart()
{
SetEntityPos("chem_chem", 15.2010, -3.024, -36.407);
StartPlayerLookAt("note_fire", 1.2, 1.5, "TheCastleWentUpInFlamesAndItsAllYourFaultYouTurd");
AddUseItemCallback("hcp", "stone_hammer_chipper", "hammer_smash", "HammerSmash", false);
PreloadParticleSystem("ps_door_damage_wood.ps");
PreloadParticleSystem("ps_dust_elevator_crash.ps");
PreloadParticleSystem("ps_scare_pulse.ps");
PreloadParticleSystem("ps_dust_impact.ps");
PreloadSound("21_intro_scream.snt");
PreloadSound("20_bend_pipe.snt");
PreloadSound("13_machine_run.snt");
SetNPCAwake("jerry", false, false);
}
void FIRE(string &in asEntity, string &in asType)
{
AddTimer("firetimer", 0.01, "FireTime");
}
void FireTime(string &in asTimer)
{
StopPlayerLookAt();
AddQuest("Investigate", "firefire");
GiveHint ("fired", "Hints", "fired", 3);
}
void HammerSmash(string &in asItem, string &in asEntity)
{
CreateParticleSystemAtEntity("ps_door_damage_wood", "ps_door_damage_wood.ps", "hammer_smash_door", false);
PlayGuiSound("break_wood_metal1.ogg", 1);
SetPropActiveAndFade("hammer_smash_door", false, 0.5);
CreateParticleSystemAtEntity("ps_dust_elevator_crash", "ps_dust_elevator_crash.ps", "hammer_smash_door", false);
CreateParticleSystemAtEntity("ps_scare_pulse", "ps_scare_pulse.ps", "hammer_smash_door", false);
CreateParticleSystemAtEntity("ps_dust_impact.ps", "ps_dust_impact.ps", "hammer_smash_door", false);
SetEntityPlayerInteractCallback("chemie", "LA", true);
}
void LA(string &in asItem)
{
AddEntityCollideCallback("Player", "SpookArea", "AAA", true, -1);
AddUseItemCallback("", "chemie", "acid_con", "AcidGet", true);
}
void AAA(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("SCREAM", "21_intro_scream.snt", "spooky", 0, false);
GiveSanityDamage(35, true);
SetEntityActive("spooky", true);
SetEntityActive("jerry", true);
SetNPCAwake("jerry", true, true);
SetEntityPlayerLookAtCallback("jerry", "WALKON", true);
}
void WALKON(string &in asEntity, int alState)
{
AddEnemyPatrolNode("jerry", "PathNodeArea_1", 0.001, "");
AddEnemyPatrolNode("jerry", "PathNodeArea_2", 0.001, "");
AddEnemyPatrolNode("jerry", "PathNodeArea_3", 0.001, "");
AddEnemyPatrolNode("jerry", "PathNodeArea_4", 0.001, "");
AddEnemyPatrolNode("jerry", "PathNodeArea_5", 7, "idle_extra2");
}
void AcidGet (string &in asItem, string &in asEntity)
{
AddTimer("acid_done", 2, "AcidDone");
FadeInSound("16_water_stream_heavy.snt", 0.1, true);
SetEntityPos("chem_chem", -15.541, -3.024, -36.407);
}
void AcidDone(string &in asTimer)
{
SetEntityPos("chem_chem", 15.2010, -3.024, -36.407);
StopSound("16_water_stream_heavy.snt", 0.5);
}