I’ve just published a small tool (weapon, really) that lets you turn yourself into a ragdoll and rope yourself to the target. http://steamcommunity.com/sharedfiles/filedetails/?id=162196866
It all works fine, you can ragdoll, unragdoll, swing around and stuff.
At the moment the length of the rope is set as the distance between you and the target. What I need some advice on is how to change the length of the rope dynamically using Lua.
The rope is created using constraint.rope() which returns a phys_lengthconstraint and a keyframe_rope
I have tried using SetKeyValue() with combinations of ‘Slack’, negative ‘addlength’, and ‘length’ without any results.
The closest I got was increasing the ‘Slack’ on the keyframe_rope made the rope appear longer, but the phys_lengthconstraint didn’t get any longer.
I tried taking a quick look at a grappling hook weapon but instead of using constraint.rope() it used ents.Create and created a keyframe_rope and move_rope, and no phys_lengthconstraint (?) …
I would really appreciate if anyone could give me some pointers on how to change the length of the rope constraint using Lua. Thanks