BIS fnc initVehicleCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision imported: BIS Functions update 7/7)
m (pf)
Line 1: Line 1:
{{Function|Comments=
____________________________________________________________________________________________


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


| arma3 |= Game name
| Moves units into vehicle seats. When units don't exist, it will create them in a group of vehicle's side. |Description=
____________________________________________________________________________________________


|1.00|= Game version
| [object, params, deleteCrew, anySeat, agents] call [[BIS_fnc_initVehicleCrew]] |Syntax=
____________________________________________________________________________________________
 
 
|p1= object: [[Object]] |Parameter 1=


| <pre>/*
|p2= params: [[Array]] - In format:
Author: Karel Moricky
*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|Parameter 2=


Description:
|p3= deleteCrew: [[Boolean]] - (Optional, default [[false]]) [[True]] to delete existing crew |Parameter 3=
Moves units into vehicle seats.
When units don't exist, it will create them in a group of vehicle's side
Parameter(s):
0: OBJECT - vehicle
1: ARRAY in format
0: OBJECT or STRING - unit or unit type (will be created)
1: STRING - role, can be "driver", "turret" or cargo"
2: NUMBER or ARRAY - cargo index or turret path
2 (Optional): BOOL - True to delete existing crew (default: false)
3 (Optional): BOOL - When desired seats are occuppied, move crew in the vehicle to any other available seat (default: false)
4 (Optional): BOOL - True to create units as agents (default: false)
Returns:
ATTAY of OBJECTS - units
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p4= anySeat: [[Boolean]] - (Optional, default [[false]]) When desired seats are occuppied, move crew in the vehicle to any other available seat |Parameter 4=
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_initVehicleCrew]]; --> |= Syntax
|p5= agents: [[Boolean]] - (Optional, default [[false]]) Create crew as [[agents]] |Parameter 4=
|p1= |= Parameter 1


| |= Return value
| [[Array]] - Created units |Return value=
____________________________________________________________________________________________
____________________________________________________________________________________________


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


| |= See also
| [[createVehicle]],[[crew]], [[driver]] |See also=
}}


}}


<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>

Revision as of 23:48, 6 June 2018

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

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

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