void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_4", "Func1", true, 0);
AddEntityCollideCallback("Player", "ScriptArea_5", "Func2", true, 0);
AddEntityCollideCallback("Player", "ScriptArea_6", "Func3", true, 0);
AddEntityCollideCallback("Player", "ScriptArea_7", "Func4", true, 0);
AddEntityCollideCallback("Player", "ScriptArea_8", "Func5", true, 0);
SetLocalVarInt("lamplit", 0);
}
void OnEnter()
{
}
void OnLeave()
{
}
void Func1(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candlestick01_1", false, true);
SetLightVisible("PointLight_1", false);
AddLocalVarInt("lamplit", 1);
check();
}
void Func2(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candlestick_floor_2", false, true);
SetLightVisible("PointLight_11", false);
AddLocalVarInt("lamplit", 1);
check();
}
void Func3(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candlestick_floor_1", false, true);
SetLightVisible("PointLight_12", false);
AddLocalVarInt("lamplit", 1);
check();
}
void Func4(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candlestick02_1", false, true);
AddLocalVarInt("lamplit", 1);
check();
}
void Func5(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candlestick02_2", false, true);
SetLightVisible("PointLight_13", false);
AddLocalVarInt("lamplit", 1);
check();
}
void check()
{
if(GetLocalVarInt("lamplit")==5)
{
FadeOut(2);
}
else
{
}
}