BIS fnc selectCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)<nowiki\/>\[\[([a-zA-Z0-9_]+)\]\](.*)<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "= <code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-_]+)\]\]([^<]*)<\/code>" to "= <code>$1$2$3</code>")
Line 27: Line 27:
|r1= [[String]] - crew type, empty if crew type not found
|r1= [[String]] - crew type, empty if crew type not found


|x1= <code>[[private]] _crewType = [blufor, [[configFile]] >> "CfgVehicles" >> "B_MRAP_01_F"] [[call]] [[BIS_fnc_selectCrew]];</code>
|x1= <code>private _crewType = [blufor, [[configFile]] >> "CfgVehicles" >> "B_MRAP_01_F"] [[call]] [[BIS_fnc_selectCrew]];</code>


|seealso= [[crew]] [[createVehicleCrew]]
|seealso= [[crew]] [[createVehicleCrew]]
}}
}}

Revision as of 16:56, 13 July 2022

Hover & click on the images for description

Description

Description:
Return an appropriate crew type for a certain vehicle.
This function should work properly in Arma 3, but be aware that if "crew" config entry is not defined in vehicle config then specific Arma 2 class names will be used as default values ("USMC_Soldier_Crew", "US_Soldier_Crew_EP1", "RU_Soldier_Crew", "TK_Soldier_Crew_EP1")
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
[side, configEntry] call BIS_fnc_selectCrew
Parameters:
side: Side - only supports west (blufor) and east (opfor) for default value (if "crew" entry is not found)
configEntry: Config - the vehicle config path
Return Value:
String - crew type, empty if crew type not found

Examples

Example 1:
private _crewType = [blufor, configFile >> "CfgVehicles" >> "B_MRAP_01_F"] call BIS_fnc_selectCrew;

Additional Information

See also:
crew createVehicleCrew

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