touch x 2 to destroy an actor Help
kajuto
Member Posts: 314
hi there, i currently i set a self.touchx2 as integer att for A actor and the rule is:
when touch is pressed
att. self touchx2 = 2
change att of self.touchx2 to true
destroy
what i really want is that when i touch 2 times fast the actor, i destroy it
thanks in advance
when touch is pressed
att. self touchx2 = 2
change att of self.touchx2 to true
destroy
what i really want is that when i touch 2 times fast the actor, i destroy it
thanks in advance
Best Answer
-
tenrdrmer Posts: 9,934When touch is pressed
-change self.touchx2 to self.touchx2+1
Timer every 0.5 seconds run to completion true
- change self.touchx2 to 0
When self.touchx2 = 2
- destroy
That should do it for you. Adjust the timer time to set how fast they have to click it. And make sure the timer is not inside any rules
Hope that helps.
Cheers
Answers