Solved nevermind

How would I make a grappling hook that can swing you around or hook on an enemy like Pathfinder’s grapple from Apex but 2d?

4 Likes

i’ve had the same question myself, i wonder if it’s possible

1 Like

You could shoot a projectile, and when it hits something set it’s x and y as a global. Then use trig functions to calculate the tension of the grapple

3 Likes

Could you make a example by any chance?

1 Like

@CodeAlpaca had an example, but sadly deleted it. They may have sigifigant knowledge of how to do this.

3 Likes

I just need a example because I have a small brain.

1 Like

same
im out of likes waaaaaaaaaaaaaa

1 Like

take this then
Copy & paste this image when you’re out of likes - A Forum Resource

3 Likes

thank you i needed this

2 Likes

no problem!

2 Likes

I deleted the example because I felt that it was not up to my standards, but I’d be glad to help in whatever way I can.

So for a grappling hook you basically need to make your player go to the hook (My example let you go through walls, which was one of the flaws with it). Get the X and Y of the hook, then the X and Y of your player. Put that into two Ease behaviors (one for the X, and one for the Y)(The player X and Y go into the “From” input, the Hook X and Y go into the “To” input). That will make your player move from it’s current position to the hook position

2 Likes

Thank you(20 hdhdjdhdhd)

2 Likes

Flowlab Game Creator - The Hazard Project Look at the Grappling Drone and Rope objects