Game Development Community

guiClockBitmapCtrl

by Robert Brower · in Torque Game Engine · 09/30/2002 (6:50 am) · 5 replies

I'm making an hour glass clock control for my player gui. From within the control code I can call getTime() to get the elapsed time like in the HudClock but how do I get the mission length time from the script to the engine?

#1
09/30/2002 (1:32 pm)
Robert,

I am not sure if you are looking for how long the mission is allowed to last or the amount of time you have been in the mission. I will guess that you are looking for how long you have been in the mission. If this is the case, then the below will give you how long you have been in the mission:
$Sim::Time - $Game::StartTime
You can see this code in use by viewing the script example\fps\server\scripts\game.cs in the function GameConnection::onClientEnterGame.

Rich
#2
01/06/2003 (10:55 am)
Since things are so hard to find on the web site I'll ask here in hopes that someone has the link to it.

I noticed a while back a clockHud that someone had fixed to show the accual time and not just a counter. Does anyone at all know the link to it?
#3
01/07/2003 (7:58 am)
Anyone? This is critical to my day/night setup.
#5
01/07/2003 (9:42 am)
Stefan..you da man! Thanks.