Button cooldown ? help please
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.
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
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