createVehicleCrew: Difference between revisions
Jump to navigation
Jump to search
m (Added example for UAVs) |
Killzone Kid (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Creates crew to given vehicle. Crew members are default crew defined in config. | | Creates crew to given vehicle. Crew members are default crew defined in config. Crew side will also correspond to vehicle's [[faction]]. |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 18: | Line 18: | ||
|x1= <code>// Spawn a flying UAV with crew. | |x1= <code>// Spawn a flying UAV with crew. | ||
myUAV = [getPos player, 0, "B_UAV_02_F", | myUAV = <nowiki>[</nowiki>[[getPos]] [[player]], 0, "B_UAV_02_F", [[west]]] call BIS_fnc_spawnVehicle; | ||
createVehicleCrew (myUAV select 0); | [[createVehicleCrew]] (myUAV [[[select]] 0); | ||
</code>|= EXAMPLE1 | </code>|= EXAMPLE1 | ||
|x2= <code>_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;</code> | |||
<code>[O Alpha 1-1:1,"OPF_F",EAST,EAST] | |||
[O Alpha 1-1:2,"OPF_F",EAST,EAST] | |||
</code>|= EXAMPLE2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[moveInDriver]], [[moveInGunner]], [[moveInCommander]], [[moveInTurret]], [[moveInCargo]] |= SEEALSO | ||
| |= MPBEHAVIOUR | | |= MPBEHAVIOUR |
Revision as of 09:18, 21 August 2013
Description
- Description:
- Creates crew to given vehicle. Crew members are default crew defined in config. Crew side will also correspond to vehicle's faction.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
// Spawn a flying UAV with crew. myUAV = [getPos player, 0, "B_UAV_02_F", west] call BIS_fnc_spawnVehicle; createVehicleCrew (myUAV [[[select]] 0);
- 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
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