I am making a side scrolling, urban ninja/parkour game, and one of the game mechanics is the grappling hook.
I know grappling hooks are not simple but I thought I’d give it a try.I’m aiming for something like the bungee levels on wOne 2The rope needs to wrap around objects that it touches like this:(Ignore the bubble in the top right, I’ve fixed that)I think I have managed to make the rope wrap around objects, using two pairs of stacks, which should be the most complicated bit, but now I can't make the swinging motion.This is what I have so far (, although don't expect to see anything without the swinging code):hereI need to have it so the length can be changed, and it also needs to be able to get closer to the pivot point than the current length of the rope (so the rope is not a rod, preventing it from getting closer than its length.)Most importantly, I need the pivot point to be moveable, as it needs to jump to each new (or old) wrap point.I’ll try and put you in special thanks if I ever finish it (which is unlikely, but still…)Thanks.Moikle
First off, change your link to "hook.gmk", instead of "gml". Second, I'm getting errors about some "hk" variable when you're pushing the stacks in "char"'s creation event.
I've never played with stacks or any data structure besides maps, really. So for this I'd suggest something like a primitive, where you could divide the rope into separate parts, and half of them are on the wall while the remaining points are straightened out because of whatever physics you implement.Seems like an ambitious script.i don't know why that happens, i set that variable via the hook object right after char's creation.
but i will change the current scripts, i just need one for swinging.I will create you a swinging hook example but it will cost you your life.
Dead Ringer.
Wha?
sounds reasonable juju
Dead Ringer = item in Team Fortress 2. You fake-die when you get hit with damage, and 8 seconds later you uncloak with a loud ZAP! So, if he is a pro in real life from Team Fortress 2, he will have a Dead Ringer Fake Watch that does not exist (like the cake, which is indeed a lie) and will feign death for the example.
Aaah I see. I might get round to it.
Thank you, Avenger, for the elaborate explanation.