0 Favourites

How do I handle a rope to a bucket

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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,137
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,733
MPPlantOfficial's avatar
MPPlantOfficial
Unread hot topic
0 Favourites
Why is Stencyl doing better?
44 16,854
Potato's avatar
Potato