Touch Sprite to Change Var based on Condition

Get help using Construct 2

Post » Sun May 05, 2013 6:48 am

I'm having trouble figuring this out... Apologies in advance if this is already explained somewhere...

I want to have a button that once touched basically toggles a sprite rotation, based upon a global variable.

So, in my project, I have a global variable called "rotateDir" it's set to 0 initally.

A sprite acts as my toggle button, and I essentially want to have the touch of this sprite to basically set the rotateDir to 1 if it's 0, and to 0 if it's 1.

Thanks for any help!
B
8
S
1
G
2
Posts: 11
Reputation: 1,606

Post » Sun May 05, 2013 4:00 pm

@crushingdower

On touched set rotateDir to 1-rotateDir.
B
79
S
32
G
23
Posts: 119
Reputation: 14,937


Return to How do I....?

Who is online

Users browsing this forum: jeffige, TheHat, Yahoo [Bot] and 1 guest