Question about the OSTIME Demo template

Cee3pee0Cee3pee0 Member, PRO Posts: 194
edited June 2012 in Working with GS (Mac)
When the clock in that demo reaches 12:00, the time reads 00:00, anyone know how to fix that?

Best Answer

  • RThurmanRThurman Posts: 2,881
    Accepted Answer
    A quick way is to create a rule.

    For the image in the 10's column:
    When ANY
    --game.Clock.Hour = 12
    --game.Clock.Hour = 0
    ----Constrain Attribute: self.Image To: 1
    --otherwise
    ----Constrain Attribute: self.Image To: (floor(( game.Clock.Hour %12)/10))..".png"

    For the image in the 1's column:
    When ANY
    --game.Clock.Hour = 12
    --game.Clock.Hour = 0
    ----Constrain Attribute: self.Image To: 2
    --otherwise
    ----Constrain Attribute: self.Image To: (floor(( game.Clock.Hour %12)%10))..".png"

Answers

  • MantoManto Member Posts: 796
    You want 24hour clock? You need to change modulo from 12 to 24. I fixed that for you Download here.
  • Cee3pee0Cee3pee0 Member, PRO Posts: 194
    You want 24hour clock? You need to change modulo from 12 to 24. I fixed that for you Download here.
    Thanks Manto1, but i dont really want a 24 hour clock i just want one that reads 12:00 and not 00:00. possible?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Glad its working for you!
Sign In or Register to comment.