How do I handle a rope to a bucket

0 favourites
  • 4 posts
From the Asset Store
Very well animated teddy bear suitable for platformer, runner and more 2D games
  • I searched around and couldn't find anything to answer my questions.

    If I just missing something, I would appreciate being pointed in the right direction.

    I have a "bucket" that is attached to a "rope." It is going vertically up and down the screen via the arrow keys (or other similar controls.)

    I need the bucket to be attached overhead to a fixed location via rope. I currently have the bucket moving up and down the screen without an issue however no rope yet.

    The rope is dual colors (a few pixels of color A and then a few pixels of color B.) The Rope is not "animated" in the fact that the colors are stationary. I just need the rope to grow as the bucket goes down, and get shorter as the bucket goes up.

    Such as attaching a line to two points on the layout. One near the top that is stationary and the other to the bucket handle that has it's Y location variable.

    Any suggestions, ideas, etc?

    I do know that the coloring sounds weird but it is trying to implement something from another platform.

    Thank you for your time, assistance and knowledge.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can't draw from point a to b, you 'll need to stretch the rope instead. So your rope needs to be stretchable or tile-able

  • using a tiled background to create the rope from hook to bucket you could set its position to hook.x,hook,y , its width to distance (hook.x,hook.y,bucket.x,bucket.y) and its angle to angle(hook.x,hook.y,bucket.x,bucket.y)

    if you'd rather set it to an imagepoint than the origin of the bucket, create an imagepoint and us bucket.imagepointX(1),bucket.imagepointY(1)

  • Thanks IndieKiwi and LittleStain for giving me some useful info to work with.

    Off hand, I am not sure what would work best yet, however, this gives me some direction to see what does.

    Thanks again!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)