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



Introduced in

Version:1.46

Description

Description: All-in-one function for DROPS scripts:* mode 0: check
    • arguments: [0, towing_vehicle, towed_vehicle]
    • what it does:
      • check if it is already towing something
      • check if there's a vehicle close enough (< 20m)
      • check if towed_vehicle is already towing towing_vehicle
      • check if there's a vehicle between them
      • check if the vehicle is towed_vehicle
    • returns true if all checks are passed
  • mode 1: start towing
    • arguments: [1, towing_vehicle, towed_vehicle, towMode]
    • towMode is optional: "Normal" (std) or "Crossover"
    • what it does:
      • runs this script with mode 0
      • if okay: start towing
    • returns true if all checks are passed
  • mode 2: start towing with given memPoints *** use only with physX vehicles! ***
    • arguments: [2, towing_vehicle, towed_vehicle, [point_of_towing_veh, point_of_towed_veh]]
    • what it does:
      • runs this script with mode 0
      • if okay: start towing
    • returns true if all checks are passed
  • mode 4: cancel
    • arguments: [4, towing_vehicle]
    • what it does:
      • cancel towing
    • returns true if un-towing is possibel
  • mode 8: towing-check
    • arguments: [8, towing_vehicle]
    • what it does:
      • check which vehicle it is towing
    • returns towed vehicle
  • mode 16: towed by-check
    • arguments: [16, towed_vehicle]
    • what it does:
      • check by which vehicle it is towed
    • returns towing vehicle

Syntax

Syntax: [mode, towing_vehicle, towed_vehicle, more] call fn_vbs_towing
Parameters:
Return Value: Boolean or Object

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:
[1, veh1, veh2] call fn_vbs_towing
Will add a rope between veh1 and veh2, if they're close enough.

Additional Information

See also: 
Multiplayer:Has global effect, the locality of the arguments does not matter.
Problems: 

Notes