(136, 35) No conversion from bool to int available.
/////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "LightArea", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "LightArea_2", true, 1);
if (HasItem("girlsdormkey_1") == true)
{
RemoveItem("girlsdormkey_1");
GiveItem("girlsdormkey_1", "key_tower.ent", "girlsdormkey", "", 1.0f);
}
}
void LightArea(string &in asParent, string &in asChild, int alState)
{
SetGlobalVarInt("music", 1);
AddTimer("", 1.0f, "lightarea_1");
AddTimer("", 2.0f, "lightarea_2");
AddTimer("", 3.0f, "lightarea_3");
AddTimer("", 4.0f, "lightarea_4");
}
void lightarea_1(string &in asTimer)
{
SetLampLit("torch_static_green_8", true, true);
SetLampLit("torch_static_green_1", true, true);
}
void lightarea_2(string &in asTimer)
{
SetLampLit("torch_static_green_7", true, true);
SetLampLit("torch_static_green_2", true, true);
}
void lightarea_3(string &in asTimer)
{
SetLampLit("torch_static_green_6", true, true);
SetLampLit("torch_static_green_3", true, true);
}
void lightarea_4(string &in asTimer)
{
SetLampLit("torch_static_green_5", true, true);
SetLampLit("torch_static_green_4", true, true);
}
void LightArea_2(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 0.5f, "lightarea_5");
AddTimer("", 1.0f, "lightarea_6");
AddTimer("", 1.5f, "lightarea_7");
AddTimer("", 2.0f, "lightarea_8");
AddTimer("", 2.5f, "lightarea_9");
AddTimer("", 3.0f, "lightarea_10");
AddTimer("", 3.5f, "lightarea_11");
AddTimer("", 4.0f, "lightarea_12");
}
void lightarea_5(string &in asTimer)
{
SetLampLit("torch_static_green_12", true, true);
SetLampLit("torch_static_green_9", true, true);
}
void lightarea_6(string &in asTimer)
{
SetLampLit("torch_static_green_11", true, true);
SetLampLit("torch_static_green_13", true, true);
}
void lightarea_7(string &in asTimer)
{
SetLampLit("torch_static_green_10", true, true);
SetLampLit("torch_static_green_14", true, true);
}
void lightarea_8(string &in asTimer)
{
SetLampLit("torch_static_green_15", true, true);
SetLampLit("torch_static_green_20", true, true);
}
void lightarea_9(string &in asTimer)
{
SetLampLit("torch_static_green_16", true, true);
SetLampLit("torch_static_green_21", true, true);
}
void lightarea_10(string &in asTimer)
{
SetLampLit("torch_static_green_17", true, true);
SetLampLit("torch_static_green_22", true, true);
}
void lightarea_11(string &in asTimer)
{
SetLampLit("torch_static_green_18", true, true);
SetLampLit("torch_static_green_23", true, true);
}
void lightarea_12(string &in asTimer)
{
SetLampLit("torch_static_green_19", true, true);
SetLampLit("torch_static_green_24", true, true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "girlsdormkey_1", "girlsdormdoor", "UsedKeyOnDoor_5", true);
AddUseItemCallback("", "lloydskey_1", "lloydsoffice", "UsedKeyOnDoor_10", true);
AddUseItemCallback("", "labkey_1", "labdoor", "UseKeyOnDoor_6", true);
SetLevelDoorLockedText("labdoor", "Message", "lablocked");
SetLevelDoorLockedText("girlsdormdoor", "Message", "girlsdormlocked");
SetEntityPlayerInteractCallback("lloydsoffice", "InteractLloydsOffice", false);
SetEntityPlayerInteractCallback("labdoor", "DemoCredits", false);
if (GetGlobalVarInt("music") == 0)
{
PlayMusic("02_amb_safe.ogg", true, 100.0, 0.0, 1, true);
}
else if (GetGlobalVarInt("music") == 1)
{
PlayMusic("09_amb_safe.ogg", true, 100.0, 0.0, 1, true);
}
}
void DemoCredits(string &in asEntity)
{
if (GetLevelDoorLocked("labdoor") == false)
{
FadeOut(2.0f);
AddTimer("", 2.0f, "DemoCredits2");
}
}
void DemoCredits2(string &in asTimer)
{
StartCredits("01_Vicarious.ogg", false, "Ending", "MainCredits", 1);
}
void InteractLloydsOffice(string &in asEntity)
{
SetMessage("Message", "lloydsdoor", 0);
}
void UsedKeyOnDoor_5(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("girlsdormdoor", false);
PlaySoundAtEntity("", "unlock_door", "girlsdormdoor", 0, false);
RemoveItem("girlsdormkey_1");
}
void UseKeyOnDoor_6(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("labdoor", false);
PlaySoundAtEntity("", "unlock_door", "labdoor", 0, false);
RemoveItem("labkey_1");
}
void UsedKeyOnDoor_10(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("lloydsoffice", false, true);
PlaySoundAtEntity("", "unlock_door", "lloydsoffice", 0, false);
RemoveItem("lloydskey_1");
SetMessage("Message", "lloydsdooropen", 0);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
StopMusic(1.0f, 1);
SetGlobalVarInt("music", 0);
}