Timer Creation

BlitzPlus Forums/BlitzPlus Beginners Area/Timer Creation

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm trying to create a timer that counts down from 60 seconds, then when it reaches zero the game ends.
Function UpdateTimer()

Timer = MilliSecs()

If MilliSecs() > Timer + counter Then
	seconds = seconds - 1
	counter = counter + 1000
End If

If seconds = 0 Then Stop

End Function

counter is self-explanitory and seconds is used as the variable to print on-screen. When tested the seconds meter does not desend. If anyone can help me fix this code or suggest a better formula please do so.