If you want the torches to be lit at the beginning while entering, you could just press on the [] lit box on every entity in the Level Editor.
If you want the torches to be lit by scripting it, you will not need any timers. You will just have to use SetLampLit("NameOfATorch", true, true); in the void OnEnter(). If you want them to be unlit when you leave, ya'll just have to put SetLampLit("NameOfATorch", false, true); in the void OnLeave().
Of course it's possible to do this with timers if you want. Put AddTimer("", 1.0f, "TorchFunc"); in the void OnEnter(). 1.0f can be changed to any other float, it determines how many seconds it will take before the timer function will be called. In this case, TorchFunc will be called in 1 second.
TorchFunc(string &in asTimer)
{
SetLampLit("NameOfATorch", false, true);
}
----------------------------
I'm not sure if I understand what you mean with "the player enters", if it means that the player enters the map, do as above, if it means that the player enters a room, just use a script area that collides with the player and calls a function that have SetLampLit("NameOfATorch", false, true); or timers that calls SetLampLit in it.
. (07-31-2012, 04:49 AM)Soverain Wrote: I want it so that torches begin to light up by themselves when the player enters and i assume timers are involved but i have no idea how to use them. Tips?