Introduced in

Version:1.54

Description

Description:

Fills vehicle crew and driver positions with the specified units.

No gunner positions are filled.

If the vehicle already has a crew, the new units join the existing group. Otherwise, a new group for all generated crew members is created.

Syntax

Syntax:[object, unittypes, maxFill, minFill] call fn_vbs_fillCrewPositions
Parameters:
  • object: Object - The vehicle to be crewed.
  • unittypes: Array - Either class names or objects (existing units), of which a random selection is used. If class names are specified, then the new units of that type are spawned; if existing units are specified, then these are placed in the vehicle.
  • maxFill: Number - Maximum number of units to place (optional, default: random number).
  • minFill: Number - Minimum number of units to place (optional, default: 1).
Return Value:Nothing

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:
[car1, [player], 5, 1] call fn_vbs_fillCrewPositions

Additional Information

See also: getCrewPos, fn vbs moveIn, fn vbs createVehicle, fn vbs putUnitsInVehicle
Multiplayer: 
Problems: 

Notes