my brain is fried. flip horizontally works 1 way, but wont go back?
I want to face my hero, left and right with the press of a button.
I have this on the hero actor.
"when touch is pressed, when attribute self.graphic.flip horizontally is true
change attribute self.graphic.flip horizontally to false"
which works fine
but if I do this
"when touch is pressed, when attribute self.graphic.flip horizontally is false
change attribute self.graphic.flip horizontally to true"
it won't flip back
What am I doing wrong?
I have this on the hero actor.
"when touch is pressed, when attribute self.graphic.flip horizontally is true
change attribute self.graphic.flip horizontally to false"
which works fine
but if I do this
"when touch is pressed, when attribute self.graphic.flip horizontally is false
change attribute self.graphic.flip horizontally to true"
it won't flip back
What am I doing wrong?
Comments
A better way to do this would be create an actor level integer attribute called FlipH
And the 2 rules.
When Touch is Press
--Change self.FlipH to (self.FlipH+1)%2
and
When self.FlipH equals 0
--Change self.Graphics.FlipHorizontally to false
Otherwise
----Change self.Graphics.FlipHorizontally to true
That will work perfectly I have even tested that out just to be sure.
Good Luck
Aaron