Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / trying to set up a timer

Author
Message
haliop_New
User Banned
Posted: 11th Jan 2017 13:34
so in my game which relays on how fast can you go from one place to another
a timer is presented to count down from 2 minutes down to 0

so what I did is ;



but this gives me an output of 119.99 , 119.98, 119.97 etc..
but what I want is that it will show me minutes instead of seconds with the 0. 2 seconds after the dot .

so ive tried to
time$ = str(120-(TIMER()-RUNTIMER/120))

but then it gives me the minutes but seconds goes up to 100 instead of 1:59 I get 1:99 which I don't want
I think I'm almost there but something is missing.

minutes:seconds(up to 60 or 59.99)

what I would really love is

minutes : seconds : milliseconds

can you help ?
thank you for your time , haliop.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Jan 2017 13:55
Damn I'm generous today
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 11th Jan 2017 14:07 Edited at: 11th Jan 2017 14:07


[Edit]Damn! Beaten to it. You posted whilst I was coding
AGK V2 user - Tier 1 (mostly)
haliop_New
User Banned
Posted: 11th Jan 2017 14:07
cant run it , what is Pad$() ?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Jan 2017 14:09
haliop_New
User Banned
Posted: 11th Jan 2017 14:13
ok AWESOME thank you both this is really helpful.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th Jan 2017 18:51
here my example
AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)

Login to post a reply

Server time is: 2024-04-24 08:49:57
Your offset time is: 2024-04-24 08:49:57