There is a swing object you could use if you have mmf. If not you'll have to code it yourself using trigonometry. You could also use the drawline extension to do the actual rope.
I use TGF... and I don't know how to use those extensions or trigonometry.. If someone knows the code how to make it, or has an example, please post it to me...
Current Projects: The Artillerys 10% Forgotten Legends 8% Earth Defender 20%
when the player first uses the rope
-set angle to angle between player and rope source
-set angvel to 0
always
-set angvel to angvel + gravity * cos(angvel)
-set angle to angle + angvel
-set x position of player to x(rope source)+cos(angle)*length
-set y position of player to y(rope source)+sin(angle)*length
collision between player and a backdrop
-set angvel to angvel*-1
Right arrow pressed
-set angvel to angvel + player speed * sin(angvel)
Left arrow pressed
-set angvel to angvel - player speed * sin(angvel)
I should think that will work, i didn't try it, but mess it about and it should work at some point.
Stuckboy
JC Denton: "I know your UNATCO killphrase: Laputan Machine."
Gunther Hermann: "I - am - not - a - machi --"
JC Denton: "Sticks and stones..."
Ben mercer, you really make it sound easy. I've been working on a ninja rope for a couple of weeks and it sure is a bitch. Especially the collision part acutally, but I almost got it now.
BTW, it's actually
always -> set angvel to angvel - sin(angle)/length, the gravity variable is not needed since it's a constant. The rest is correct I think.
Oh, and if you're using TGF, Perttu Tuovinen, you might as well give up. Working with geometry in TGF plain stinks, the advanced math object is really buggy, and I don't think there are other objects that can do adv. math very well.
I'm telling you, it sucks using trig in TGF. Out of curiosity, I tried to reproduce my ninja rope engine in TGF. (And I finally found out how to get around those damn bugs in the adv. match object ). Link: http://www.megaupload.com/?d=VEOJJF9U, (wish I could remember the password my webspace T_T, you'll have to do it with megaupload). It's only the pendulum movement, if you want to work on it, go ahead. You'll notice the movement is a bit buggy, that's because TGF can't work with decimals.
It really works, Hernan, but if I use it in my game, it messes up with background collisions and it goes crappy... but that really is what that ninja rope has to be.
Current Projects: The Artillerys 10% Forgotten Legends 8% Earth Defender 20%