BIS fnc selectCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>")
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|gr1 = Object Manipulation |GROUP1=
|game3= tkoh
|version3= 1.00


| Return an appropriate crew type for a certain vehicle.<br>
|game4= arma3
{{Important|
|version4= 0.50
This function should work properly in {{arma3}}, but be aware that if "crew" config entry is not defined in vehicle config then specific {{arma2}} class names will be used as default values (''"USMC_Soldier_Crew"'', ''"US_Soldier_Crew_EP1"'', ''"RU_Soldier_Crew"'', ''"TK_Soldier_Crew_EP1"'')}} |DESCRIPTION=


| [side, configEntry] call [[BIS_fnc_selectCrew]] |SYNTAX=
|gr1= Object Manipulation


|p1= side: [[Side]] - only supports [[west]] ([[blufor]]) and [[east]] ([[opfor]]) for default value (if "crew" entry is not found) |PARAMETER1=
|descr= Return an appropriate crew type for a certain vehicle.<br>
{{Feature|important|
This function should work properly in {{arma3}}, but be aware that if "crew" config entry is not defined in vehicle config then specific {{arma2}} class names will be used as default values (''"USMC_Soldier_Crew"'', ''"US_Soldier_Crew_EP1"'', ''"RU_Soldier_Crew"'', ''"TK_Soldier_Crew_EP1"'')}}


|p2= configEntry: [[Config]] - the vehicle config path |PARAMETER2=
|s1= [side, configEntry] call [[BIS_fnc_selectCrew]]


| [[String]] - crew type, empty if crew type not found |RETURNVALUE=
|p1= side: [[Side]] - only supports [[west]] ([[blufor]]) and [[east]] ([[opfor]]) for default value (if "crew" entry is not found)


|x1= <code>_crewType = [<nowiki/>[[blufor]], [[configFile]] >> "CfgVehicles" >> "B_MRAP_01_F"] [[call]] [[BIS_fnc_selectCrew]];</code> |EXAMPLE1=
|p2= configEntry: [[Config]] - the vehicle config path


| [[crew]], [[createVehicleCrew]] |SEEALSO=
|r1= [[String]] - crew type, empty if crew type not found
}}


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>private _crewType = [blufor, configFile >> "CfgVehicles" >> "B_MRAP_01_F"] call BIS_fnc_selectCrew;</sqf>


[[Category:Functions|{{uc:selectCrew}}]]
|seealso= [[crew]] [[createVehicleCrew]]
[[Category:{{Name|arma2}}: Functions|{{uc:selectCrew}}]]
}}
[[Category:{{Name|arma2oa}}: Functions|{{uc:selectCrew}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:selectCrew}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:selectCrew}}]]

Latest revision as of 17:00, 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