Jump to content
kcal

How to attach a object to the middle of a rope?

Recommended Posts

I'm making fast roping script, and i used "ropeAttachTo" to attach rope with unit. The problem is, I can only attach it to the end of the rope, not the middle. how can i attach a object to the middle of a rope? 

Share this post


Link to post
Share on other sites

I solved this by making a Vehicle. 
1. attach the object to the rope. 
2. create a vehicle that can create a rope. (check vehicle list here : https://community.bistudio.com/wiki/ropeCreate/transport)
3. And create a rope in the Vehicle.
4. then attach created Vehicle to object.

 

It's not the best solution, but it looks pretty good if you adjust the offset well.

 

code : 

_ropeUp = ropeCreate[_vehicle,[0,0,0],_length];
private _glue = "PaperCar" createVehicle [0,0,0];
_glue allowDamage false;
_ropeDown = ropeCreate [_glue,[0,0,0],0];
_glue attachTo [_unit,[0,0,0]];
[_unit,[0,0,0]] ropeAttachTo (_ropeUp);

If you want to place an object on the top of the rope, decrease the length of the _ropeUp and increase the length of the _ropeDown . If you want to place an object at the bottom of the rope, do the opposite.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×