BIS fnc selectCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "<br />" to "<br>")
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Function|Comments=
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| arma2 |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| Return an appropriate crew type for a certain vehicle.<br>
/*
{{Important|
File: selectCrew.sqf
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=
____________________________________________________________________________________________


Description:
| [side, configEntry] call [[BIS_fnc_selectCrew]] |SYNTAX=
Return an appropriate crew type for a certain vehicle.
Parameter(s):
_this select 0: side (Side)
_this select 1: vehicle config entry (Config)
Returns:
String - crew type
*/


//Validate parameter count
|p1= side: [[Side]] - only supports [[west]] ([[blufor]]) and [[east]] ([[opfor]]) for default value (if "crew" entry is not found) |PARAMETER1=
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_selectCrew]]; --> |= Syntax
|p2= configEntry: [[Config]] - the vehicle config path |PARAMETER2=


|p1= |= Parameter 1
| [[String]] - crew type, empty if crew type not found |RETURNVALUE=
 
| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


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


| |= See also
| [[crew]], [[createVehicleCrew]] |SEEALSO=
 
}}
}}



Revision as of 14:25, 19 March 2020

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:
Uncategorised

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:
_crewType = [blufor, configFile >> "CfgVehicles" >> "B_MRAP_01_F"] call BIS_fnc_selectCrew;

Additional Information

See also:
crewcreateVehicleCrew

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

Notes

Bottom Section