math timer display issue

SingleSparqSingleSparq Member Posts: 1,339
edited November -1 in Working with GS (Mac)
Having a strange problem. I have a countdown attribute "timer". I have 2 buttons to set the time either minus 200 or plus 200 to the main timer - so if the timer is set to 500 and I choose a button it ether adds or subtracts 200 to the timer (game.timer.... game.timer+200 would equal 700).

Now if I set the text to display the game.timer it shows properly but if I use this equation to show it in a clock style timer (00:00) it does not like anything added.

If I say game.timer+50 (and the game timer is set to 600) it starts the clock at 50 instead of 650

Here is the display expression

floor(floor(( game.Timer /3600)/60)/10)..floor((floor( game.Timer %3600)/60)%10)..":"..floor(( game.Timer %60)/10)..floor( game.Timer %10)

- any suggests?

Comments

  • SingleSparqSingleSparq Member Posts: 1,339
    Egats! - yes I took out some of the extra code for stuff I didn't need - I shall check again, thanks!.
  • SingleSparqSingleSparq Member Posts: 1,339
    YESS! works - thank you, was driving me nuts. Not sure where in the world you are but it's 1:20 am here and now I can sleep without thinking about the issue. Cheers.
  • SingleSparqSingleSparq Member Posts: 1,339
    Yes Barrie, Canada for me. The world is a little smaller now.
  • SingleSparqSingleSparq Member Posts: 1,339
    And I work in Aurora (grew up there actually) - getting scared now. I work at The Cartwright Group (Canada Law book) As web development Manager.
  • Mcreator83Mcreator83 Member Posts: 120
    ah found what i was looking for!

    so i read your posts guys and i checked my code and it is correct yet it does not want to display 180 seconds as in 3min. if i put in -180 it displays 55.00 and if i just want 3min it shows 00.00 :P

    so is this an error in the 09.82 build or something?
Sign In or Register to comment.