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




Introduced in

Version:3.4

Description

Description:Goes through the crew positions in a vehicle and finds the first available position most suited for casualties.

Position search priorities are:

  1. Litter positions.
  2. Cargo positions.
  3. Gunner positions.

In addition to these three priorities, the position furthest from the driver is used.

Syntax

Syntax:[vehicle, useLitter] call fn_vbs_findCargoPos
Parameters:
  • vehicle: Object - Vehicle in which to find a position for casualties.
  • useLitter: Boolean - Whether to give preference to litter positions (optional, default: true).
Return Value:Array - Returns an array containing these elements:
  • cargoType: String - "gunner", "cargo" or "" (if none found).
  • cargoPos: Number or Array - Either cargo position or turret path.
  • onLitter: Boolean - Whether a litter position was found.

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:
_ret = [tank1] call fn_vbs_findCargoPos

Additional Information

See also: 
Multiplayer: 
Problems: 

Notes