Switching boolean attribute on/off not working - why?
I keep coming across small problems like this - and its obviously down to how GS works, but again I'm stuck...
I've created a attribute called FLIP
I have a button in my scene and it has these 2 rules:
Rule1:
When actor receives event - touch is pressed
AND Attribute Flipped = TRUE
> Change attribute - Flipped to FALSE
Rule 2:
When actor receives event - touch is pressed
AND Attribute Flipped = FALSE
> Change attribute - Flipped to TRUE
It doesn't work. It'll work if I only have one of the rules, but then can't be changed back. They obviously counteract each other somehow - but I don't see how.
How can I do this?
I've created a attribute called FLIP
I have a button in my scene and it has these 2 rules:
Rule1:
When actor receives event - touch is pressed
AND Attribute Flipped = TRUE
> Change attribute - Flipped to FALSE
Rule 2:
When actor receives event - touch is pressed
AND Attribute Flipped = FALSE
> Change attribute - Flipped to TRUE
It doesn't work. It'll work if I only have one of the rules, but then can't be changed back. They obviously counteract each other somehow - but I don't see how.
How can I do this?
Comments
http://gamesalad.com/forums/topic.php?id=28825
I don't know if it makes a differences, but the image i'm pressing isn't the image I want to flip. The pressed image is just acting as a trigger.
%2 is how you tell it to just cycle between 0 and 1 if you did %3 it would switch between 0, 1, & 2.