touch x 2 to destroy an actor Help

kajutokajuto Member Posts: 314
edited July 2012 in Miscellaneous
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

Best Answer

  • tenrdrmertenrdrmer Posts: 9,934
    Accepted Answer
    When 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

  • kajutokajuto Member Posts: 314
    thanks Tenrdrmer, i just missed that thanks really!!
  • EpicEpic Member Posts: 89
    edited July 2012
    @tenrdrmer you beat me too it :) I was just about to say something similar to that ( it's one of the rare questions that I understand what's going on )
Sign In or Register to comment.