createVehicleCrew: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "since= Arma3" to "since= arma3") |
||
Line 27: | Line 27: | ||
|s2= group [[createVehicleCrew]] vehicle | |s2= group [[createVehicleCrew]] vehicle | ||
|s2since= | |s2since= arma3 2.14 | ||
|p21= group: [[Group]] - group to put crew in | |p21= group: [[Group]] - group to put crew in | ||
Line 35: | Line 35: | ||
|s3= side [[createVehicleCrew]] vehicle | |s3= side [[createVehicleCrew]] vehicle | ||
|s3since= | |s3since= arma3 2.14 | ||
|p41= side: [[Side]] - side to create crew on | |p41= side: [[Side]] - side to create crew on |
Revision as of 16:26, 9 February 2024
Description
- Description:
- Creates vehicle crew corresponding to the provided vehicle's faction. If the vehicle is already occupied, the command will only create missing crew in the existing vehicle's group.
To find out which crew will be created, use BIS_fnc_vehicleCrewTurrets. - Groups:
- Object Manipulation
Syntax 1
- Syntax:
- createVehicleCrew vehicle
- Parameters:
- vehicle: Object - vehicle to populate with crew
- Return Value:
- Group - the group of the created crew (since 1.94; before that returned Nothing)
Syntax 2
- Syntax:
- group createVehicleCrew vehicle
- Parameters:
- group: Group - group to put crew in
- vehicle: Object - vehicle to populate with crew
- Return Value:
- Group - the group of the created crew or grpNull
Syntax 3
- Syntax:
- side createVehicleCrew vehicle
- Parameters:
- side: Side - side to create crew on
- vehicle: Object - vehicle to populate with crew
- Return Value:
- Group - the group of the created crew or grpNull
Examples
- Example 1:
- _veh = createVehicle ["B_MRAP_01_F", getMarkerPos "createVeh", [], 0, "NONE"]; createVehicleCrew _veh;
- Example 2:
Additional Information
- See also:
- deleteVehicleCrew moveInDriver moveInGunner moveInCommander moveInTurret moveInCargo BIS_fnc_spawnVehicle
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on Aug 20, 2014 - 14:01 (UTC)
-
As of Arma 3 v1.26 the command will work on non-empty vehicles. If any of the crew defined in config are missing they will be added.
- Posted on Dec 22, 2015 - 14:19 (UTC)
- createVehicleCrew does not work with Transport Unload waypoints for helicopters. You need to spawn the pilots separately and then get them into the helicopter in order to get Transport Unload waypoints to work.
- Posted on Jun 02, 2017 - 03:26 (UTC)
-
The particular seats to which units are added depend on the dontCreateAI property, the hasDriver property of the base class, and the hasGunner propery of turret classes.
For instance, the following snippet calculates how many seats will be occupied by the created crew:Also, I've written a function to create a UAV crew for a specific side: https://gist.github.com/AgentRev/cb25d30e464f2239b6cee51fa0110c78private _vehCfg = configFile >> "CfgVehicles" >> typeOf _vehicle; private _crewCount = { round getNumber (_x >> "dontCreateAI") < 1 && ((_x == _vehCfg && { round getNumber (_x >> "hasDriver") > 0 }) || (_x != _vehCfg && { round getNumber (_x >> "hasGunner") > 0 })) } count ([_vehicle, configNull] call BIS_fnc_getTurrets);