Good Game Timer
by John Klotz · in Torque Game Builder · 08/07/2006 (1:01 pm) · 1 replies
I want to display a Timeleft Box in the corner with a countdown for one of my games and can't figure out how to manipulate the SetTimerOn function to do so. I got all the gui stuff down but don't think I am approaching this the correct way.
Not getting any errors with this. It just won't show up.
Any suggestions?
function t2dscene::onupdatescene(%this, %scenegraph)
{
$timeleft = 10000 - SetTimerOn(10000);
//I am assuming here that 10000 represents 10 seconds as it does elsewhere in T2D
//I am also assuming the settimeon starts at 0 and works towards how many seconds it is set too
timeleft.setText($timeleft);
}Not getting any errors with this. It just won't show up.
Any suggestions?
Torque Owner Kevin James
Keep in mind that you must specify which object is calling the function.
EX: