BIS fnc initVehicleCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - ">\[ +(.*) *\] +(call|spawn)" to ">[$1] $2")
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Vehicles


|gr1 = Vehicles |GROUP1=
|descr= Moves units into vehicle seats. When units don't exist, it will create them in a group of vehicle's side.


| Moves units into vehicle seats. When units don't exist, it will create them in a group of vehicle's side. |Description=
|s1= [object, params, deleteCrew, anySeat, agents] call [[BIS_fnc_initVehicleCrew]]


| [object, params, deleteCrew, anySeat, agents] call [[BIS_fnc_initVehicleCrew]] |Syntax=
|p1= object: [[Object]]


 
|p2= params: [[Array]] - in format:
|p1= object: [[Object]] |Parameter 1=
 
|p2= params: [[Array]] - In format:
*0: crewType: [[Object]] or [[String]] - unit or unit type (will be created)
*0: crewType: [[Object]] or [[String]] - unit or unit type (will be created)
*1: role: [[String]] - Can be:
*1: role: [[String]] - Can be:
Line 20: Line 18:
**"turret"
**"turret"
**"cargo"
**"cargo"
*2: index: [[Number]] or [[Array]] - Cargo index or turret path|Parameter 2=
*2: index: [[Number]] or [[Array]] - Cargo index or turret path


|p3= deleteCrew: [[Boolean]] - (Optional, default [[false]]) [[true]] to delete existing crew |Parameter 3=
|p3= deleteCrew: [[Boolean]] - (Optional, default [[false]]) [[true]] to delete existing crew


|p4= anySeat: [[Boolean]] - (Optional, default [[false]]) When desired seats are occuppied, move crew in the vehicle to any other available seat |Parameter 4=
|p4= anySeat: [[Boolean]] - (Optional, default [[false]]) when desired seats are occuppied, move crew in the vehicle to any other available seat


|p5= agents: [[Boolean]] - (Optional, default [[false]]) Create crew as [[agents]] |Parameter 5=
|p5= agents: [[Boolean]] - (Optional, default [[false]]) create crew as [[agents]]


| [[Array]] - Created units |Return value=
|r1= [[Array]] - created units


|x1= <code>[ someVehicle, [<nowiki/>[[player]], "driver", 0], [[true]], [[true]] ] [[call]] [[BIS_fnc_initVehicleCrew]];</code> |Example 1=
|x1= <sqf>[someVehicle, [player, "driver", 0], true, true] call BIS_fnc_initVehicleCrew;</sqf>


| [[createVehicle]],[[crew]], [[driver]] |See also=
|seealso= [[createVehicle]] [[crew]] [[driver]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:initVehicleCrew}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:initVehicleCrew}}]]

Latest revision as of 17:27, 8 November 2023

Hover & click on the images for description

Description

Description:
Moves units into vehicle seats. When units don't exist, it will create them in a group of vehicle's side.
Execution:
call
Groups:
Vehicles

Syntax

Syntax:
[object, params, deleteCrew, anySeat, agents] call BIS_fnc_initVehicleCrew
Parameters:
object: Object
params: Array - in format:
  • 0: crewType: Object or String - unit or unit type (will be created)
  • 1: role: String - Can be:
    • "driver"
    • "turret"
    • "cargo"
  • 2: index: Number or Array - Cargo index or turret path
deleteCrew: Boolean - (Optional, default false) true to delete existing crew
anySeat: Boolean - (Optional, default false) when desired seats are occuppied, move crew in the vehicle to any other available seat
agents: Boolean - (Optional, default false) create crew as agents
Return Value:
Array - created units

Examples

Example 1:
[someVehicle, [player, "driver", 0], true, true] call BIS_fnc_initVehicleCrew;

Additional Information

See also:
createVehicle crew driver

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