void PourOpium(string &in flask01_orpiment_1, string &in acid_machine_bottle_empty01_1)
{
SetEntityActive("acid_machine_bottle_empty01_1", false);
SetEntityActive("acid_machine_bottle01_1", true);
SetWheelStuckState("special_burner_1", 0, false);
RemoveItem("flask01_orpiment_1");
AddLocalVarInt("OpiumAdded", 1);
PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, false);
}
void LightBurner(string &in asEntity, int alState)
{
if (alState == 1)
{
CreateParticleSystemAtEntity("burner1", "ps_fire_lab_burner.ps", "BurnerArea", false);
PlaySoundAtEntity("IgniteSound", "general_fire_burning_low", "BurnerArea", 1, false);
if (GetLocalVarInt("OpiumAdded") == 1)
{
AddTimer("on", 3, "TimerBondCountdown");
}
}
if (alState == -1)
{
DestroyParticleSystem("burner1");
StopSound("IgniteSound", 1);
if (GetLocalVarInt("OpiumAdded") == 1)
{
AddTimer("off", 3, "TimerBondCountdown");
SetLocalVarInt("BondingMix", 1);
}
}
}
void TimerBondCountdown(string &in asTimer)
{
if(asTimer == "on")
{
CreateParticleSystemAtEntity("burnersteam1", "ps_chemical_heat.ps", "BurnerArea_1", false);
PlaySoundAtEntity("FirstBoil","puzzle_boil.snt", "acid_machine_bottle01_1", 1, false);
SetLocalVarInt("BondingMix", 2);
}
if(asTimer == "off")
{
DestroyParticleSystem("burnersteam1");
StopSound("FirstBoil", 1);
SetLocalVarInt("BondingMix", 0);
}
}
void PourIodine(string &in flask01_calamine_1, string &in acid_machine_bottle01_1)
{
if (GetLocalVarInt("BondingMix") == 0)
{
AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);
}
if (GetLocalVarInt("BondingMix") == 2)
{
GivePlayerDamage(101, "BloodSplash", true, true);
PlaySoundAtEntity("scare", "react_scare", "Player", 0.25f, false);
CreateParticleSystemAtEntity("","explosion.ps", "BurnerArea_1", false);
PlaySoundAtEntity("", "break_wood_metal.snt", "BurnerArea_1", 0, false);
AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);
}
if (GetLocalVarInt("BondingMix") == 1)
{
RemoveItem("flask01_calamine_1");
PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, false);
SetWheelStuckState("special_burner_1", -1, false);
GiveSanityBoost();
AddTimer("", 3, "Laudanum");
}
}
void Laudanum()
{
SetEntityActive("potion_health_1", true);
}
void OnStart()
{
AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);
AddUseItemCallback("", "flask01_orpiment_1", "acid_machine_bottle_empty01_1", "PourOpium", true);
}
void OnEnter()
{
}
void OnLeave()
{
SetupLoadScreen("LoadingText", "Loading", 7, "HNBKChapterOne.jpg");
}