Countdown Timer

marty_colwellmarty_colwell Member Posts: 4
edited November -1 in Working with GS (Mac)
Quick Question, How do I display a timer and have it count down? Let's say, start at 100 and go to 0 without it going into the negative.

Comments

  • superNESsuperNES Member Posts: 166
    Try this:

    1) Create an integer attribute in your actor called "Timer" and set it to 100
    2) In the actor add a "Display Text" behavior that displays the above attribute (self.Timer)
    3) Create a new rule that checks if the attribute self.Timer > 0
    4) Within the rule, add a Timer and set to Every 1 second
    5) Within the Timer add a change attribute and change self.Timer to self.Timer - 1

    That should hopefully do it.
  • marty_colwellmarty_colwell Member Posts: 4
    Worked perfect, Thanks superNES.
Sign In or Register to comment.