Is this what you're after?:
https://www.dropbox.com/s/hfifnkqcvj0yd ... .capx?dl=0
You can stop the piston tracking the angle of the flywheel by disabling the "set angle" action in both events.
In your original code the problem was that as soon as the second event moved the piston back under 600px the first event would trigger shifting it back to 250px
Fantastic, thanks for the excellent example.
The code I originally had was indeed wrong, I couldn't figure out the best way to have it behave correctly.
What does the commas in the angle expression signify?
Looking at the code, without understanding the purpose of the commas, here is what I have gathered:
Every tick (and on init), the angle of the piston references the coordinates of itself and then it appears to reference an imagepoint on the flywheel.
I have also noted that the imagepoint is defined on the sprite and is easily changed, this is great although the piston seems to fall out of 'sync' at certain points of rotation.
The X coordinate also references the flywheel, by subtracting it's width from the flywheel.
So in other words, the code is dynamic and should be easily adjustable.
Thanks again, this will prove to be extremely useful for future purposes.