createVehicleCrew: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">") |
Lou Montana (talk | contribs) m (Text replacement - " <dd class="notedate">" to " <dt><dt> <dd class="notedate">") |
||
Line 47: | Line 47: | ||
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. | 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. | ||
</dd> | </dd> | ||
<dt><dt> | |||
<dd class="notedate">Posted on November 8, 2014 - 17:06 (UTC)</dd> | <dd class="notedate">Posted on November 8, 2014 - 17:06 (UTC)</dd> | ||
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt> | <dt class="note">[[User:Tankbuster|Tankbuster]]</dt> | ||
Line 54: | Line 54: | ||
So a gunship Huron will get a pilot and copilot plus 2 door gunners, but nobody in the back. | So a gunship Huron will get a pilot and copilot plus 2 door gunners, but nobody in the back. | ||
</dd> | </dd> | ||
<dt><dt> | |||
<dd class="notedate">Posted on December 22, 2015 - 14:19 (UTC)</dd> | <dd class="notedate">Posted on December 22, 2015 - 14:19 (UTC)</dd> | ||
<dt class="note">[[User:DrPastah|DrPastah]]</dt> | <dt class="note">[[User:DrPastah|DrPastah]]</dt> | ||
Line 60: | Line 60: | ||
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. | 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. | ||
</dd> | </dd> | ||
<dt><dt> | |||
<dd class="notedate">Posted on July 2, 2017 - 03:26 (UTC)</dd> | <dd class="notedate">Posted on July 2, 2017 - 03:26 (UTC)</dd> | ||
<dt class="note">[[User:AgentRevolution|AgentRev]]</dt> | <dt class="note">[[User:AgentRevolution|AgentRev]]</dt> |
Revision as of 00:10, 6 April 2021
Description
- Description:
- Description needed
- Groups:
- Object Manipulation
Syntax
- Syntax:
- Syntax needed
- Parameters:
- vehicle: Object - vehicle to populate with crew
- Return Value:
- Return value needed
Examples
- Example 1:
_veh = createVehicle ["B_MRAP_01_F", getMarkerPos "createVeh", [], 0, "NONE"]; createVehicleCrew _veh;
- Example 2:
_veh = createVehicle ["O_MRAP_02_hmg_F", position player, [], 0, "NONE"]; createVehicleCrew _veh; { diag_log [_x, faction _x, side _x, side group _x]; } forEach crew _veh;
[O Alpha 1-1:1,"OPF_F",EAST,EAST] [O Alpha 1-1:2,"OPF_F",EAST,EAST]
Additional Information
- See also:
- deleteVehicleCrewmoveInDrivermoveInGunnermoveInCommandermoveInTurretmoveInCargoBIS_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 August 20, 2014 - 14:01 (UTC)
- SilentSpike
- 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 November 8, 2014 - 17:06 (UTC)
- Tankbuster
- This command creates drivers/copilots, commanders and gunners where appropriate, but it never creates cargo crew. So a gunship Huron will get a pilot and copilot plus 2 door gunners, but nobody in the back.
- Posted on December 22, 2015 - 14:19 (UTC)
- DrPastah
- 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 July 2, 2017 - 03:26 (UTC)
- AgentRev
-
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:private _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);
Also, I've written a function to create a UAV crew for a specific side: https://gist.github.com/AgentRev/cb25d30e464f2239b6cee51fa0110c78