help needed
I've been working on a script to turn off the lamps in a hallway, but unfortunately when I enter the script area nothing happens. I've checked the common "name" error and syntax but I cant seem to solve this especially since I'm a scripting noob. Here's my .hps script. Any help would be appreciated.
void OnStart()
{
AddEntityCollideCallback("", "KillTheLights", "LightsOut", true, 1);
}
void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("torch1", false, true);
AddTimer("", 2, "Out2");
}
void Out2(string &in asTimer)
{
SetLampLit("torch2", false, true);
AddTimer("", 2, "Out3");
}
void Out3(string &in asTimer)
{
SetLampLit("torch3", false, true);
AddTimer("", 2, "Out4");
}
void Out4(string &in asTimer)
{
SetLampLit("torch4", false, true);
AddTimer("", 2, "Out5");
}
void Out5(string &in asTimer)
{
SetLampLit("torch5", false, true);
AddTimer("", 2, "Out6");
}
void Out6(string &in asTimer)
{
SetLampLit("torch6", false, true);
AddTimer("", 2, "Out7");
}
void Out7(string &in asTimer)
{
SetLampLit("torch7", false, true);
AddTimer("", 2, "Out8");
}
void Out8(string &in asTimer)
{
SetLampLit("torch8", false, true);
AddTimer("", 2, "Out9");
}
void Out9(string &in asTimer)
{
SetLampLit("torch9", false, true);
AddTimer("", 2, "Out10");
}
void Out10(string &in asTimer)
{
SetLampLit("torch10", false, true);
}
void OnEnter()
{
}
void OnLeave()
{
}
|