This example shows a bar of time remaining, and where lots of rem marks are is where you can easily add time based actions.
[edit]
i have put a ` infront of all unneed lines if u wanted to make something else and a * if there needs to be it some how
Global OldTime As Integer
OldTime = Timer()
`sync on
`gold = RGB(187,184,62)
`blue = rgb(0,0,255)
`input "Time in seconds: ", *time#
origtime# = time#
`do
if *secondtimer(1)= 1
gosub second
endif
`gosub timepercent
`ink blue,black
`box (screen width() /2),20,((screen width() / 2)+100),30
`ink gold,black
`box (screen width() /2),20,((screen width() /2) + timeper),30
`sync
loop
second:
if time# > 0
Time# = time# - 1
else
end
endif
`
`
`
`
`
return
timepercent:
timeper = (time#/origtime#)*100
return
Function SecondTimer(SecondsToCount)
If Timer() < OldTime+(1000*SecondsToCount) Then ExitFunction 0
OldTime = Timer()
EndFunction 1
if you want to count more/less then one second then change the star in the line to whatever you need to fit your needs
To count less the one second You would have to change the function.
In this example it will count half seconds.
Function SecondTimer(SecondsToCount)
If Timer() < OldTime+(500*SecondsToCount) Then ExitFunction 0
OldTime = Timer()
EndFunction 1
Yeah its that simple you just change the 1000 to 500
I got the function from Mson a while back. I just found a reason to use it around a week ago.
Have fun counting, wait you have a computer for that now
If at first you dont succeed, LOWER YOUR STANDARDS.