hours using game.time???

morphinegamingmachinemorphinegamingmachine Member, PRO Posts: 449
edited February 2012 in Working with GS (Mac)
i don't want the clock hour

whats the function for hours using game time

floor( something something something)

Comments

  • 3xL3xL Member Posts: 676
    whats the function for floor? lol i gotta get my !@#$% together
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    @3xl

    Floor rounds down, and ceil rounds up.

    Example:

    floor(0.004) = 0
    ceil(0.004) = 1
  • 3xL3xL Member Posts: 676
    oh ok. thanks.. i was looking for the gs glossary but i can't find it on this new webpage anymore
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited February 2012
    No problem.

    Yeah the wiki reference page is gone. But someone was so kind enough to post this, so we can still get to it!

    http://web.archive.org/web/20101201052929/http://gamesalad.com/wiki/
  • 3xL3xL Member Posts: 676
    OH WOW, I USED TO LOVE THE "WAYBACK MACHINE". WHY DIDNT I THINK OF THIS????

    awesome thanks bro!
  • morphinegamingmachinemorphinegamingmachine Member, PRO Posts: 449
    so any help with how to get milliseconds to hours? please
  • CloudsClouds Member Posts: 1,599
    @JohnPapiomitis

    "Floor rounds down, and ceil rounds up."

    Thanks for that John ! It's seemingly impossible to find information on even half of Gamesalad's functionality, without a shadow of a doubt it is the least documented piece of software I have ever come across (by a long margin), and I have used Photoshop 2!


  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @morphinegamingmachine

    "so any help with how to get milliseconds to hours?"

    1 hour = 3,600,000 milliseconds.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    @ 3xl and tynan

    No problem guys. And yeah even with the cookbook, i dont think there was any reason to take the wiki down. Theres some really useful stuff and explantions in there, bookmark the link i posted!

    @ morphinegaming

    I have it written down somewhere, let me get it
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited February 2012
    hours = floor(game.time/3600)

    So to say display it all in a display text it would be:

    floor( game.time /3600)..":"..floor(floor(( game.time %3600)/60)/10)..floor((floor( game.time %3600)/60)%10)..":"..floor(( game.time %60)/10).. game.time %10
  • morphinegamingmachinemorphinegamingmachine Member, PRO Posts: 449
    much love, all i had to do was change it to include )%10) at the end of your string so it would restart at 9 and go back to 0
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    no problem glad i could help
Sign In or Register to comment.