[Solved] flipping, only once

I made this event to flip horizontally a parallelogram after clicking on it by center mouse button but it flips only once, not every time I pressed the center mouse button. Where is my mistake?
flipping.png

You must find a way to alternate yes and no :slight_smile:

You can use the middle button to control a variable.
Conditions:
The curser is on paral
Middle button is pressed

Sub-Event

Conditions:

If paral is flipped horizontally | Flip horizontally paral : Yes

If paral is NOT flipped horizontally | Flip horizontally paral : No

Still not working. Now no flipping at all. :frowning:
flipping2.png

Oh sorry, you also need a condition in there so it does not execute both sub-events… Otherwise, when it reaches the second sub-event, that will be true and it will flip it back. It should look like this:

Conditions:
The curser is on paral
Middle button is pressed

Actions:
Set Variable done = 0

Sub-Event

Variable done = 0 | Do = 1 to Variable done
If paral is flipped horizontally | Flip horizontally paral : Yes

Variable done = 0 | Do = 1 to variable done
If paral is NOT flipped horizontally | Flip horizontally paral : No

Maybe there is somewhere a working example of using flipping event/action? I just can not make it work.
For now I can just change the animation/animation frame of the object and it works fine.

Similar problem with changing frames of animation: they change only once (but there are 5 frames).:
frame_change.png

You should add a “Trigger once” condition to avoid the actions to be repeat while the right button is pressed (but just one time when you begin de press the button).

I don’t see what is the problem implementing all the advice you’ve received in this thread:
flip-n-frame.zip (3.76 KB)

Sorry, can not open your project. There is a message that it was made in the older version of GD. Can you just show the events in it (screenshot)?

I updated GD just yesterday.
This project is made in the last version of GD to date.
And as @4ian said and I understand, projects saved with the last version of GD don’t will open in previous versions of GD due to important format changes.

So, update your GD.

A̶n̶d̶ ̶n̶o̶p̶e̶,̶ ̶I̶ ̶c̶a̶n̶’̶t̶ ̶s̶h̶o̶w̶ ̶y̶o̶u̶ ̶t̶h̶e̶ ̶e̶v̶e̶n̶t̶s̶ ̶i̶n̶ ̶a̶ ̶s̶c̶r̶e̶e̶n̶s̶h̶o̶t̶ ̶a̶n̶d̶ ̶i̶t̶’̶s̶ ̶n̶o̶t̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶I̶ ̶d̶o̶n̶’̶t̶ ̶w̶a̶n̶t̶ ̶b̶u̶t̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶t̶h̶e̶ ̶p̶r̶o̶j̶e̶c̶t̶ ̶i̶s̶ ̶h̶i̶g̶h̶l̶y̶ ̶c̶o̶m̶m̶e̶n̶t̶e̶d̶ ̶a̶n̶d̶ ̶i̶t̶ ̶d̶o̶n̶’̶t̶ ̶f̶i̶t̶s̶ ̶i̶n̶ ̶a̶ ̶s̶i̶n̶g̶l̶e̶ ̶s̶c̶r̶e̶e̶n̶s̶h̶o̶t̶ ̶(̶a̶t̶ ̶l̶e̶a̶s̶t̶ ̶i̶n̶ ̶m̶y̶ ̶h̶u̶m̶b̶l̶e̶ ̶1̶3̶6̶6̶x̶7̶6̶8̶ ̶s̶c̶r̶e̶e̶n̶ ̶r̶e̶s̶o̶l̶u̶t̶i̶o̶n̶)̶.̶

Here are the events without the comments and, as you can see, my GD is in spanish… so, hope you understand what I’m doing there:

Thank you for the great help! Used your screenshot to do the example and it works great. Now on to update my GD. Thanks for the advice! :slight_smile:

:wink:

Be careful, the latest update is still being tested, and I’m still fixing bugs on it. :slight_smile: