Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do timers work?
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: how do timers work?

What you do is add 1 timer:

AddTimer("", 1, "Torch_1");
This timer takes 1 second before it calls the function "Torch_1"


Then you make the function:

void Torch_1(string &in asTimer)
{
SetLampLit("Torch_1", true, true);
AddTimer("", 1, "Torch_2");
}

See? I added another timer inside the timer function. So when the first function is called, the second is triggered 1 second later. This makes the torches light up with 1 second in between.

Repeat this for all your torches:


void Torch_2(string &in asTimer)
{
SetLampLit("Torch_2", true, true);
AddTimer("", 1, "Torch_3");
}




void Torch_3(string &in asTimer)
{
SetLampLit("Torch_3", true, true);
AddTimer("", 1, "Torch_4");
}

Trying is the first step to success.
07-31-2012, 08:58 PM
Find


Messages In This Thread
how do timers work? - by Soverain - 07-31-2012, 04:49 AM
RE: how do timers work? - by Mackiiboy - 07-31-2012, 09:56 AM
RE: how do timers work? - by ApeCake - 07-31-2012, 10:45 AM
RE: how do timers work? - by Soverain - 07-31-2012, 08:49 PM
RE: how do timers work? - by Mackiiboy - 07-31-2012, 09:02 PM
RE: how do timers work? - by FlawlessHappiness - 07-31-2012, 08:58 PM
RE: how do timers work? - by Soverain - 07-31-2012, 09:51 PM



Users browsing this thread: 1 Guest(s)