Clock running down

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
I programmed a clock, with display text, like the tutorial of tshirtbooth, but is there a chance to make the time running down ? Like from 10 seconds to zero? Now the clock is running "up"...

I didn't find any information about that....

Thanks

Comments

  • JadarStudiosJadarStudios Member Posts: 264
    You might have to change the numbers to negative numbers, but idk if that will work..
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I am gonna try it...thank you
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Thanks tshirtbooth but then the time get's shown up jsut every second.

    I did it like your tutorial, just with seconds and miliseconds, but with the long
    expression floor......the time is running "up"

    Isn't there a way to make it just running down?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    And how also to reset time?

    I tried to use the current scene time but did not work. Concerning when pressing a button
    to reset scene.

    thx
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okay Update, I did it this way,

    I made an actor and an Attribute (index 10). And in my actor I said constrain attribute to self.timer

    Works fine but ist here a way to display it in hundredth of seconds?
  • RumiRumi Member, PRO Posts: 343
    There is a way. Create an attribute that is a real type. set it to 10 and create a rule: Interpolate attribute to 0 in 10 seconds. Then have it display that real attribute.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Problem is that it again displays time in thousand of seconds ://
  • RumiRumi Member, PRO Posts: 343
    Use the floor or ceil function. in the display text, open up the expression editor and type ceil(game.attribute) Ceil rounds up to the nearest whole while floor rounds down
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Ah perfect :D just one additional question, now time is displayed in whole numbers, possible to do it in hundredth??

    :)
  • Rob2Rob2 Member Posts: 2,402
    prec(self.countDown, 2)
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Thank all of you a lot :)
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Just a question, what am I doing wrong when I have a reset button, and I press this button I want the scene to be reseted. So I said when touch is pressed reset scene and change attribute time to 10 again...But then time is just set to 0, and when I press the button again, it start's to run again ??

    why that?
Sign In or Register to comment.