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
a proper scripting loop
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#2
RE: a proper scripting loop

You do it by making a timer that calls itself.

So in the enter of an area to start the loop you have
AddTimer("myloop", 0.1f, "TimerLoop");

Then in the area to end the loop you have
RemoveTimer("myloop");

And the timer function itself should be
void TimerLoop(string &in asTimer)
{
    AddPropImpulse("BouncingObject", 0, 1, 0, "World");

    AddTimer("myloop", 0.1f, "TimerLoop");
}
09-22-2010, 06:09 PM
Website Find


Messages In This Thread
a proper scripting loop - by gosseyn - 09-22-2010, 05:42 PM
RE: a proper scripting loop - by jens - 09-22-2010, 06:09 PM
RE: a proper scripting loop - by gosseyn - 09-22-2010, 06:19 PM
RE: a proper scripting loop - by gosseyn - 09-23-2010, 02:02 PM
RE: a proper scripting loop - by Pandemoneus - 09-23-2010, 02:47 PM
RE: a proper scripting loop - by gosseyn - 09-23-2010, 02:57 PM
RE: a proper scripting loop - by jens - 09-23-2010, 02:58 PM



Users browsing this thread: 2 Guest(s)