User Tag List

Results 1 to 6 of 6

Thread: Need a little help with displaying a big total of seconds into a proper time format

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Shmuper's Avatar
    Join Date
    Mar 2010
    Location
    Japan
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need a little help with displaying a big total of seconds into a proper time format

    I am adding 1 to a counter every second of the game. This goes to one big global value. Now for exemple after a while this number might end up being 589. I can display the minutes easily (I just do set counter to global value / 60. But what about the seconds ? I need some kind of formula where the hundreds get ignored and then if the two digits are higher then 59 set counter to 0, otherwise display the two digits...

    Thank you for your help.

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For the seconds, you can use "Mod". For example, "589 mod 60" equals 49 (seconds). "589/60" equals 9 (minutes).
    So, for a timer, you could have 2 counters. Set the first to "$Time / 60" for the minutes, and the second to "$Time mod 60" for the seconds. You could go a step further and get hours, days, etc., if needed too.

    What "Mod" does, is get the remainder after a division is performed. For example, 589 / 60 = 9 with 49 remaining., thus 589 mod 60 = 49. (similar to getting the 0.8166666666 left over, and multiplying that by 60 = 49)

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Shmuper's Avatar
    Join Date
    Mar 2010
    Location
    Japan
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rocking. Thanks a lot. ! Mod skill acquired

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem, glad to help

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Me likey!!

  6. #6
    Clicker Fusion 2.5iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    906
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    is mod is good.

Similar Threads

  1. Game Time.. Use Seconds or alterable value?
    By DaveC in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 27th February 2012, 04:51 PM
  2. Proper wav format
    By willy in forum XNA Export Module Version 2.0
    Replies: 2
    Last Post: 14th June 2011, 08:48 PM
  3. calculate the total hour time from 1440 munutes
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 20th February 2009, 11:39 PM
  4. Counter not displaying proper number
    By jellytot in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd January 2009, 10:11 AM
  5. Displaying the Date in 05/05/2006 format
    By Wingamez in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 17th August 2006, 06:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •