Timer help plz

Blitz3D Forums/Blitz3D Beginners Area/Timer help plz

CodeOrc(Posted 2004) [#1]
I looked through the forums and found a couple examples that just wasn't what I need and they use 2D graphics wich will slow down my 3D scenes or so I've been told.

What I'm after is a timer, say 15 minutes, that displays as xx:xx:xx and when it hits 00:00:00 it will goto a function that marks the end of the game.

And all it has do to is print text, nothing special.

Thanx in advance


Matty(Posted 2004) [#2]
;outside main loop
EndTime=Millisecs()+900000
;inside main loop
TimeRemaining=(EndTime-millisecs())/1000 ;in seconds
MinutesRemaining=TimeRemaining / 60 ;in minutes
Seconds=TimeRemaining Mod 60 ;in seconds
text 0,0,MinutesRemaining+":"+Seconds
If Millisecs()>EndTime then EndGameFunction()


CodeOrc(Posted 2004) [#3]
Perfect! Thanks much for your help Matty!