Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:17.2.0

Description

Description: Initiates rope towing for given parent and child objects.

Syntax

Syntax: [parentConnection, childConnection, ropeLength] call fn_tow_startRopeTow
Parameters:
  • parentConnection: Array - [parentVeh, parentMemPoint] - Parent connection data. Use fn tow getAvailableTowPoints to find out possible values:
    • parentVeh: Object - Parent vehicle.
    • parentMemPoint: String - Name of memory point to connect the rope to.
  • childConnection: Array - [childVeh, childMemPoint] - Child connection data. Use fn tow getAvailableTowPoints to find out possible values:
    • childVeh: Object - Child vehicle.
    • childMemPoint: String - Name of memory point to connect the rope to.
  • ropeLength: Number - (Optional) Approximate length (in meters) of the rope to use for the connection. Negative or zero values mean automatic length (default: -1).
  • exceptions: Boolean - (Optional) Determines whether the code should throw an exception upon an error (default: false).
Return Value: ropeID: Number - Unique ID of the created rope.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples: Make vehicle1 tow vehicle2 using a rope of automatic length:
[[vehicle1, "tieDown_2_1"], [vehicle2, "tieDown_1_1"]] call fn_tow_startRopeTow
Make vehicle1 tow vehicle2 using a rope of fixed length of approximately 5 meters:
[[vehicle1, "tieDown_2_1"], [vehicle2, "tieDown_1_1"], 5] call fn_tow_startRopeTow
Make vehicle1 tow vehicle2 using a rope of automatic length, print exception using hint:
try {[[vehicle1, "tieDown_2_1"], [vehicle2,"tieDown_1_1"], -1, true] call fn_tow_startRopeTow} catch {hintC str _exception}

Additional Information

See also: fn tow towParent, fn tow towChild, fn tow canTow, fn tow canHitch, fn tow startTow, fn tow startHitch, fn tow stopTow, fn tow stopHitch, fn tow stopRopeTow, fn tow getRopeTowConnections, fn tow getAvailableTowPoints, fn tow setPointLocked
Multiplayer:Can be applied to remote objects, the locality of the arguments does not matter.
Problems: 

Notes