The most common way, I think, is to use physics. On the example browser, look up the example "Physics: Distance Joint" and "Physics: Vehicle". Those should help you with learning the needed concepts.
If you want a more traditional look — non-physics based — then you can use hierarchy. Here's how you can do it with hierarchy:
Create the following objects:
• 9-patch "Rope"
- make its graphic a square filling up the canvas
- On the layout stretch the object horizontally
- set its "Origin" to "Left"
- add the behavior "Sine", "set Movement" to "Angle"
- rotate the object to make it start upright
• Sprite RopeGrabDetect
- make it a circle
Events:
When the rope is created, attach a RopeGrabDetect object to the rope.
• Event: Rope > On Created
- Action 1: Create Object > RopeGrabDetect, X = Rope.BBoxRight, Y = Rope.Height/2
- Action 2: Rope > Add Child > RopeGrabDetect
Attach the player when it collides with RopeGrabDetect.
• Event: Player > On collision with RopeGrabDetect
- Action 1: RopeGrabDetect > Add Child > Player
- Action 2 (after the previous action): Player > Set Position > X = RopeGrabDetect.X + (adjust to your liking), Y = RopeGrabDetect.Y + (adjust to your liking)
Hi, thanks for the reply! Maybe I'm doing something wrong, but I can't get the RopeGrabDetect to follow the Rope, nor the Player to get attached to the RopeGrabDetect. That said, this type of mechanic will probably be useful in the future, but what I was actually looking for is a mechanic in which there is a static point for the player to swing itself, be it by coming in close range or by shooting a rope to attach to the point.