Button cooldown ? help please

bobtheturtlebobtheturtle Member Posts: 226
edited October 2012 in Working with GS (Mac)
Hi,

I have a button that, when pressed,power up spawns.

I need that button to have a cooldown time, So when i press the button multiple times, nothing happens for the 10 second cooldown time.



Comments

  • Mr HansonMr Hanson Member Posts: 94
    Hello @bobtheturtle

    Create a self.attribute in the actor and name CanTouch or something and change it to true. Then create a rule that says:
    When touched and self.CanTouch is True
    Do power
    change self.Can Touch to false
    Add a timer that says after 10 seconds (run to completion is checked) change self.CanTouch to true.

    Hope that works

    All the best
    JonApp
  • bobtheturtlebobtheturtle Member Posts: 226
    worked perfectly! thank you so much jonapp! :)
Sign In or Register to comment.