BIS fnc spawnCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(\[[^ ]+\] (call|spawn) ('''|\[\[)BI(N|S)_fnc_[a-zA-Z0-9_]+('''|\]\]));? \| *p1 *=" to " |s1=$1 |p1=")
m (Some wiki formatting)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| arma2
|game1= arma2
|1.00
|version1= 1.00


|game2= arma2oa
|game2= arma2oa
Line 15: Line 15:
|gr1= Object Manipulation
|gr1= Object Manipulation


| Function to fill all crew positions in a vehicle, including turrets.
|descr= 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 dummy mode no objects are created and the returned array contains only ones; this mode can be used to count the actual crew of an existing vehicle or vehicle type (see also [[crew]], [[fullCrew]]).
In this mode the function can be used to count the actual crew of an existing vehicle or vehicle type.


|s1=[vehicle,group,dummyMode,dummyType,crewType]] call [[BIS_fnc_spawnCrew]]
|s1= [vehicle, group, dummyMode, dummyType, crewType]] call [[BIS_fnc_spawnCrew]]


|p1= vehicle: [[Object]] - Vehicle
|p1= vehicle: [[Object]] - vehicle


|p2= group: [[Group]] - Crew's group
|p2= group: [[Group]] - crew's group


|p3= dummyMode: [[Boolean]] - (Optional, default [[false]]) [[true]] to enable dummy mode
|p3= dummyMode: [[Boolean]] - (Optional, default [[false]]) [[true]] to enable dummy mode


|p4= dummyType: [[String]] - (Optional, default "") Dummy type
|p4= dummyType: [[String]] - (Optional, default "") dummy type


|p5= crewType: [[String]] - (Optional, default "") Crew type
|p5= crewType: [[String]] - (Optional, default "") crew type


|r1= [[Array]] or [[Number]] - Created crew objects or crew count
|r1= [[Array]] or [[Number]] - created crew objects or crew count


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


|seealso= [[crew]]
|seealso= [[crew]] [[fullCrew]]
}}
}}


[[Category:{{Name|arma2}}: Functions|{{uc:spawnCrew}}]]
{{Note
[[Category:{{Name|arma2oa}}: Functions|{{uc:spawnCrew}}]]
|user= Tankbuster
[[Category:{{Name|tkoh}}: Functions|{{uc:spawnCrew}}]]
|timestamp= 20150224215200
[[Category:{{Name|arma3}}: Functions|{{uc:spawnCrew}}]]
|text= This makes FFV units but no cargo crew.
 
}}
<dl class="command_description">
 
<dt></dt>
<dd class="notedate">Posted on February 24, 2015 - 21:52 (UTC)</dd>
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
<dd class="note">
 
This makes FFV units but no cargo crew.
</dd>
</dl>

Latest revision as of 12:22, 8 November 2023

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; this mode can be used to count the actual crew of an existing vehicle or vehicle type (see also crew, fullCrew).
Execution:
call
Groups:
Object Manipulation

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 fullCrew

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
Tankbuster - c
Posted on Feb 24, 2015 - 21:52 (UTC)
This makes FFV units but no cargo crew.