Timers For Scripts
by Grant McNeil · in Torque Game Engine · 04/07/2003 (10:28 am) · 3 replies
Hey,
I'm thinking of coding a basic Hi-Res Timer as part of the ItemData class, for use with items in the script.
I was just wondering if there is already a timer in there, or any other method of timing, making the idea of me creating a timer redundant.
I'd just like to know, because there is no point in doing it if there's a better way.
thanks,
--Grant
(p.s., I'm doing this for a couple reasons, mainly for grenades that use real seconds for the fuse, and a whole bunch of other stuff... And if the alternate method is too much then don't bother posting it, ill just make a timer.)
Edit: (p.s.s. and dont just suggest frame-based timing.)
I'm thinking of coding a basic Hi-Res Timer as part of the ItemData class, for use with items in the script.
I was just wondering if there is already a timer in there, or any other method of timing, making the idea of me creating a timer redundant.
I'd just like to know, because there is no point in doing it if there's a better way.
thanks,
--Grant
(p.s., I'm doing this for a couple reasons, mainly for grenades that use real seconds for the fuse, and a whole bunch of other stuff... And if the alternate method is too much then don't bother posting it, ill just make a timer.)
Edit: (p.s.s. and dont just suggest frame-based timing.)
About the author
#2
04/07/2003 (11:20 am)
Schedule works on miliseconds, so it should have the timing resolution you need.
#3
I wrote a tutorial on schedule a while back which you should probably read
www.liquid.nq.net/tutorial/
04/09/2003 (4:22 am)
There are a couple of differnet ways to use scheduleI wrote a tutorial on schedule a while back which you should probably read
www.liquid.nq.net/tutorial/
Associate Ron Yacketta
do a search of the .cs files for schedule