wad67's Recent Forum Activity

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I had previously made a post outlining the problem and the steps I had taken in order to resolve it, For some reason it has vanished.

    I'm attempting to model a steam engine, for a game I am working on.

    I have the relevant underlying mechanics sorted out, and I have a flywheel rotating at speeds depending on these underlying mechanics.

    I'm currently unable to figure out how to implement the valve rod and piston for the engine. It does not have to do anything other than be animated in relation to the flywheel.

    I currently having it travelling to the right, which is governed by the angle of the flywheel.

    But I'm not sure how to get it to travel back to the left.

    imgur.com/a/mlSDD

    In addition, here is a link to the .capx

    drive(dot)google(dot)com/file/d/0B_8zveWSf50XVEdOR1NXamN1WHc/view?usp=sharing

wad67's avatar

wad67

Member since 31 Jul, 2017

None one is following wad67 yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies