Basic Double Touch Question

rhysdaramborhysdarambo Member, PRO Posts: 33

Hi There.
I have a menu Item and I need the following:
When the user touches it the first time, it changes opacity (to signal it has been touched) and comes up with a few things.
Then the second time they touch it, it actually triggers the change of scene.
So my question is, how do I setup 2 behaviours like this for the touch action?

Thanks!

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited May 2014

    @rhysdarambo‌ , make a self variable calling it self.State for example.

    Then have the following rules

        Rule ALL: if Touch is pressed and self.State = 0 
                 Timer after 0.1 seconds (Run to Completion)
                      change attribute self.State=1
                 end Timer
                 do first set of actions
        end of rule
    
        Rule ALL: if Touch is pressed and self.State = 1
                 Timer after 0.1 seconds (Run to Completion)
                      change attribute self.State=0
                 end Timer
                 do change scene
        end of rule
    
  • rhysdaramborhysdarambo Member, PRO Posts: 33

    Thank you friend :)

Sign In or Register to comment.