Game Development Community

Game Timer

by fiveforty · in Torque Game Engine · 10/31/2005 (3:44 pm) · 10 replies

Could someone please help me out with this one??

I'm wanting to have a countdown clock on screen for my racing demo... the player will have to complete X number of laps in a certain time otherwise they fail

so I need help with 3 points

1. getting a timer on screen
2. setting a time limit for X laps and if done take them to well done screen
3. or take to fail screen if time limit is passed

I know that there is a guiClockHud.cc file but I dont know how to implement that on screen
and then set it to react to laps completed


if someone could point me towards a resource or explain it to me in plain english... I'm new to torque and programming so any help would be most grateful

#1
11/02/2005 (4:54 am)
Can anyone help??
#2
11/02/2005 (5:58 am)
1) Use GuiTextCtrl
2) use schedule
3) really up to you

There are plenty of Resources and books available I would recommend read some before dedicating time to a set project.

Learn how to script then do baby steps until you can tackle bigger issues.
#3
11/02/2005 (10:02 pm)
I made a really simple GUI Mission Timer...that counts down from the time that is initialized in script. Its actually configurable. I was thinking of making this a resource but it was sooooo simple i figured i would just be preaching to the choir.

Let me know if you need help.
#4
11/03/2005 (3:38 am)
I think that you should make it a resource... can find any, and it would be a great help to newbs like me
preach away!!! :)

if you could email it to me you would be a life saver
#5
11/03/2005 (4:30 am)
Theres already a resource for this. It's called gui countdown clock or something like that.

Edit. Found it.
#6
11/03/2005 (11:04 am)
Thanks a lot chris
I did a search and some how overlooked this

how would I make the game jump to a game over screen when the timer runs out
anthony suggested using schedule but I dont really understand how that works
can someone shed some light on it for me??
#7
11/03/2005 (11:07 am)
Its already done in the starter.fps.......there is a game scores screen i believe when the mission is over.
#8
11/03/2005 (3:38 pm)
There a game score on the start.racing that take you to the score screen once you have completed X number of laps but it doesnt matter how long you take as long as you complete the laps

is the start.fps different?? does it take you there once the game time is over no matter if you finish the goal of the mission or not?
#9
11/03/2005 (9:51 pm)
You specify a death match end time.....and when that expires it shows a score board
#10
11/04/2005 (3:02 am)
Ok thanks a lot.. I'll look into that :)