Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduced in



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]
  • vehicle: Object - Object rope is attached to.
  • ropeClass: String - Type of rope to use. Can be "vbs2_rope_segment","vbs2_rope_segment_0_6", or "vbs2_rope_segment_1_2".
  • hookClass: String - Type of hook to use. Leave empty empty for no hook. For V1.50+ hook must be a physX class.
  • ropeTop: String or Array - Either [x,y,z] offset, or name of rope's memory point which connects to the previous segment.
  • ropeBottom: String or Array - Either [x,y,z] offset, name of rope's memory point which connects to the next segment.
  • offset: String or Array - Winch offset in relation to vehicle. Either an array ([x,y,z]) or a named selection,
  • swingSpring: Number - Spring created in swing directions, from interval <0, inf), 0 means no spring will be used
  • twistSpring: Number - Spring created in twist directions, from interval <0, inf), 0 means no spring will be used
  • damping: Number - damping simulates environmental (air) friction and can be used for stabilizing the rope perpetual swinging, from interval <0, inf), 0 means no damping, reasonable values are around 0.2
  • collision: Boolean - Toggles collisions for the winch rope segments (Optional, default: true) (V2.03+)
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_0_3","vbs2vbs_helicopter_heloHookhook", [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 "vbs2vbs_helicopter_heloHookhook" is created.

Additional Information

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.