|Description:||Creates "winchable" rope segments, which are attached to a vehicle.|
A vehicle can have several winches attached to it.
When attaching objects to the created rope, this should be done via createJointExt - SphereJoint:
_endrope = winchEndSegment winch; // last rope segment on existing winch [someObj,_endrope] createJointExt ["FixedJoint",["tieDown_1_1"],]; // attach object to rope
|Syntax:||winchCreate [vehicle, ropeClass, hookClass, ropeTop, ropeBottom, offset, [swingSpring, twistSpring, damping], collision]|
|Return Value:||NetObject - Winch device (-1, if failed to create)|
_winch = winchCreate [heli,"vbs2_rope_segment","", "top", "bottom", [0, 0, 0], [0, 0, 0]]Creates a winch on the object at [0,0,0], and for the rope segments uses the class "vbs2_rope_segment". The model has two memory addresses, "top" and "bottom", to get the model coordinate position where to attach each segment to. Winch does not use a hook so none is specified.
_winch = winchCreate [heli,"vbs2_rope_segment","vbs2_heloHook", [0,1,0], "bottom", "MyWinchPos", [0, 0, 0]]Creates a winch at the heli's "MyWinchPos" memory position. Use as the top point of each segment [0,1,0] instead of a memory address and for the bottom position use the memory address "bottom". No swingSrping, or twistSpring and damping. A hook of type "vbs2_heloHook" is created.
|See also:||winches, winchUnwind, winchDispose, createRope|
- Posted on Jul 16, 2010
- Any hooks create via this command are currently not attached to the vehicle, so this option should only be used on static vehicles.