Page tree

Versions Compared

Key

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




Introduced in

Version:1.54

Description

Description:

Fills

a

vehicle

's

crew and driver positions with the specified

unit types

units.

No gunner positions

will be

are filled.

If the vehicle already has a crew, the new units

will

join the existing group. Otherwise,

otherwise

a new group for all generated crew members

will be

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
will be
  • is used.

  • If class names are specified, then the new units of that type
will be
  • are spawned; if existing units are specified, then these
will be
  • 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, [
w1,typeOf
player
,"vbs2_iq_civ_man_03"
], 
10
5, 
5
1] call fn_vbs_fillCrewPositions

Additional Information

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

Notes