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

Sign In or Register to comment.