Arma 3 Scripting

BIS_fnc_spawnVehicle

  • Arma 3 v0.50
  • First in Arma 2 v1.00

Function · Markdown · JSON · original wiki page

Description

Function to spawn a certain vehicle type with all crew (including turrets). The vehicle can either become part of an existing group or create a new group.

Important

Before Arma 3 (Arma 2, Take On Helicopters):

  • a Functions Module must be placed in order to use this function
  • a side's center has to exist (by already having a unit of said side on the map)/be created via createCenter or the vehicle will spawn empty.

Syntax

[position, direction, type, sideOrGroup] call BIS_fnc_spawnVehicle

Parameters:

Returns: Array format [createdVehicle, crew, group]:

Examples

Example 1

[getPos player, 180, "BMP3", east] call BIS_fnc_spawnVehicle;

Example 2

private _result = [getPos player, 180, "BMP3", east] call BIS_fnc_spawnVehicle;

private _vehicle = _result select 0;
_result params ["_vehicle", "_crew", "_group"];

See also

respawnVehicle · createVehicle · createUnit · crew