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




Introduced in

Version:3.7

Description

Description: Moves the specified units into a vehicle.
Seats are assigned in the following order: driver, gunner, cargo. Any occupied or setBlockedSeat seats are skipped.

Syntax

Syntax: [vehicle, units] call fn_vbs_putUnitsInVehicle
Parameters:
  • vehicle: Object - The vehicle to occupy.
  • units: Array of Object - The units which should be moved in.
Return Value: Array of Object - If more units were passed than fit into the vehicle, the leftover units will be returned in this array. Otherwise an empty array is returned.

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:
_left = [truck1, [soldier1,soldier2,soldier3]] call fn_vbs_putUnitsInVehicle

Additional Information

See also: fn vbs moveIn, fn vbs createVehicle, fn vbs fillCrewPositions
Multiplayer: 
Problems: 

Notes