////////////////////////////
// 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","FlashScare",false,1);
for (int x = 1; x < 3; x++) {
AddEnemyPatrolNode("male_arm_1", "PathNodeArea_"+x, 0, "");
}
}
void FlashScare(string &in asParent, string &in asChild, int alState)
{
ShowEnemyPlayerPosition("male_arm_1");
AddDebugMessage("Information",false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity,false,true);
PlaySoundAtEntity("","unlock_door", asEntity, 0, false);
RemoveItem(asItem);
if (asEntity == "cabinet_metal_1") {
SetEntityActive("block_box_1",false);
}
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}