BIS fnc spawnCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (pf)
Line 1: Line 1:
{{Function|Comments=
____________________________________________________________________________________________
| arma2 |Game name=


{{Function|= Comments
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| Function to fill all crew positions in a vehicle, including turrets.
In dummy mode no objects are created and the returned array contains only ones.
In this mode the function can be used to count the actual crew of an existing vehicle or vehicle type.|Description=
____________________________________________________________________________________________


|1.00|= Game version
| [vehicle,group,dummyMode,dummyType,crewType]] call [[BIS_fnc_spawnCrew]] |Syntax=
____________________________________________________________________________________________


| <pre>
/*
File: spawnCrew.sqf


Description:
|p1= vehicle: [[Object]] - Vehicle |Parameter 1=
Function to fill all crew positions in a vehicle, including turrets.
In dummy mode no objects are created and the returned array contains only ones.
In this mode the function can be used to count the actual crew of an existing vehicle or vehicle type.


Parameter(s):
|p2= group: [[Group]] - Crew's group |Parameter 2=
_this select 0: the vehicle (Object)
_this select 1: the crew's group (Group)
_this select 2: (optional) dummy mode toggle (Boolean)
_this select 3: (optional) dummy mode type (String)
_this select 4: (optional) crew type (String)


Returns:
|p3= dummyMode: [[Boolean]] - (Optional, default [[false]]) [[True]] to enable dummy mode |Parameter 3=
Array of Objects or Scalars - newly created crew or crew count
*/


//Validate parameter count
|p4= dummyType: [[String]] - (Optional, default "") Dummy type |Parameter 4=
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_spawnCrew]]; --> |= Syntax
|p5= crewType: [[String]] - (Optional, default "") Crew type |Parameter 5=


|p1= |= Parameter 1
| [[Array]] or [[Number]] - Created crew objects or crew count |Return value=


| |= Return value
<!---
|exec= spawn |= Execution
--->
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>[ BIS_vehicle, [[group]] [[player]] ] [[call]] [[BIS_fnc_spawnCrew]];</code>|Example 1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[crew]] |See also=
 
}}
}}



Revision as of 15:50, 15 June 2018

Hover & click on the images for description

Description

Description:
Function to fill all crew positions in a vehicle, including turrets. In dummy mode no objects are created and the returned array contains only ones. In this mode the function can be used to count the actual crew of an existing vehicle or vehicle type.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[vehicle,group,dummyMode,dummyType,crewType]] call BIS_fnc_spawnCrew
Parameters:
vehicle: Object - Vehicle
group: Group - Crew's group
dummyMode: Boolean - (Optional, default false) True to enable dummy mode
dummyType: String - (Optional, default "") Dummy type
crewType: String - (Optional, default "") Crew type
Return Value:
Array or Number - Created crew objects or crew count

Examples

Example 1:
[ BIS_vehicle, group player ] call BIS_fnc_spawnCrew;

Additional Information

See also:
crew

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

Posted on February 24, 2015 - 21:52 (UTC)
Tankbuster
This makes FFV units but no cargo crew.