Page tree

Versions Compared

Key

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



Introduced in

Version:1.46

Description

Description:All-in-one function for DROPS scripts:
  • Mode 0: Check
    • Arguments: [0, vehicle, rack]
    • What it does:
      • Checks if the vehicle is DROPS-capable.
      • Checks if the rack is DROPS-capable.
      • Checks if the vehicle is not loading / unloading something at the moment.
      • Checks if the positions are correct.
      • Checks if the rack is the closest one.
    • Returns true, if all the checks are passed.
  • Mode 1: Load
    • Arguments: [1, vehicle, rack]
    • What it does:
      • Runs this script with mode 0.
      • If correct, starts loading the script.
    • Returns true, if all the checks are passed.
  • Mode 2: Return Rack
    • Arguments: [2, vehicle]
    • What it does:
      • Looks for a loaded rack.
    • Returns the rack or objNull.
  • Mode 4: Unload
    • Arguments: [1, vehicle]
    • What it does:
      • Checks if the vehicle is not loading / unloading something at the moment.
      • Checks if there is enough space behind the vehicle.
      • Starts the unloading script.
    • Returns true, if all the checks are passed.

Syntax

Syntax:[mode, vehicle, rack] call fn_vbs_DROPS
Parameters:
  • mode: Number - The mode (see the modes in the description)
  • vehicle: Object - The truck.
  • rack (optional): Object - The rack.
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, rack1] call fn_vbs_DROPS
// Loads rack1 on veh1.

Additional Information

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

Notes