////////////////////////////
// Run first time starting map
void OnStart()
{
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
AddEntityCollideCallback("Player","ScriptArea_1","RollCredits",false,1);
AddUseItemCallback("","wooden_bucket_filled_1","ScriptArea_1","PutOutFire", true);
}
void PutOutFire(string &in asItem, string &in asEntity) {
SetEntityActive("SignArea_1",false);
SetEntityActive("Key_Cabinet",true);
DestroyParticleSystem("ParticleSystem_1");
SetEntityActive("ScriptArea_1",false);
}
void Fire(string &in asEntity, int alState) {
if(alState == 1) {
SetMessage("Observation", "Fire", 2.0f);
}
}
void InfectedAppear(string &in asEntity) {
SetSwingDoorLocked("cabinet_metal_1", true, false);
SetSwingDoorClosed("cabinet_metal_1", true, true);
AddTimer("0",1.5f,"InfectiveActive");
}
void InfectiveActive(string &in asTimer) {
SetEntityActive("character_infected_alpha_1",true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}