Something like this would do. Feel free to change all the function/torch names, and modify the timers!
For this, you will need a script area named TorchCollideArea, and a hallway with some torches. When you collide the TorchCollideArea, two torches will be lit every 0,5 second. You can add more / remove some torches, and edit if you want the timers to be called faster/slower :]
void OnStart()
{
AddEntityCollideCallback("Player", "TorchCollideArea", "TorchFunc", true, 1);
}
void TorchFunc(string &in asParent, string &in asChild, int alState)
{
AddTimer("T1", 0.0f, "TorchTimer");
AddTimer("T2", 0.5f, "TorchTimer");
AddTimer("T3", 1.0f, "TorchTimer");
AddTimer("T4", 1.5f, "TorchTimer");
}
void TorchTimer(string &in asTimer)
{
string x = asTimer;
if (x == "T1")
{
SetLampLit("Torch_1", true, true);
SetLampLit("Torch_2", true, true);
}
else if (x == "T2")
{
SetLampLit("Torch_2", true, true);
SetLampLit("Torch_3", true, true);
}
else if (x == "T3")
{
SetLampLit("Torch_4", true, true);
SetLampLit("Torch_5", true, true);
}
else if (x == "T4")
{
SetLampLit("Torch_5", true, true);
SetLampLit("Torch_6", true, true);
}
}
. (07-31-2012, 08:49 PM)Soverain Wrote: Sorry if I am not clear. What I mean by the torches lighting up is that I saw another persons CS where he had a bunch of torches down a hall and they all lit up one by one which i thought was pretty cool