Game Development Community

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.)

#1
04/07/2003 (10:38 am)
have you looked at schedule?
do a search of the .cs files for schedule
#2
04/07/2003 (11:20 am)
Schedule works on miliseconds, so it should have the timing resolution you need.
#3
04/09/2003 (4:22 am)
There are a couple of differnet ways to use schedule
I wrote a tutorial on schedule a while back which you should probably read
www.liquid.nq.net/tutorial/