I made this game to show a problem I have with other games I am making. So the code works when you press the left button. The block doesn’t change and the blue stripe on it faces left.
And when you press the right button, the animation flips.
But when you press the right button again, it flips it back over to facing left
It seems like it is flipping the animation over and over again. How do I make it flip only when it was facing a different direction? Like when you press the right button it won’t flip if it is already facing right.
(the issue was the code ALWAYS flips the animation, even if the animation was already flipped, which is why I just made one copy of it. You could also fix it by keeping a variable to track which direction you are facing, and only flip it when necessary)
well it seems to me that every time you pressed the right button you were flipping the animation backwards, so even in pressing right, you’re turning it back to left, and then to right, and then to left. it’s a permanent change to the sprite animation. i just set it all up in the on start event.