Need Help with Timer
by Rutgers Preparatory School (#000 · in Technical Issues · 08/13/2007 (3:10 pm) · 1 replies
Hello,
I've remade the 'fish game' tutorial into a space-themed survival game. However, I'm having trouble with making a working timer that displays how long the player has been alive, and stopping once the player dies. If any of you could help me, it would be greatly appreciated.
Thanks.
I've remade the 'fish game' tutorial into a space-themed survival game. However, I'm having trouble with making a working timer that displays how long the player has been alive, and stopping once the player dies. If any of you could help me, it would be greatly appreciated.
Thanks.
Torque Owner Frank Korf
Call it once to save your start time:
$startTime = getRealTime ();
Then call it again to get the difference
$timeSpent = getRealTime () - $startTime;
getRealTime() returns the current time in milleseconds