BIS fnc vehicleRoles: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 8: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Returns vehicle roles. |= Description
 
____________________________________________________________________________________________
Description:
Returns vehicle roles


Parameter(s):
| vehicle call [[BIS_fnc_vehicleRoles]] |= Syntax
0: OBJECT or STRING


Returns:
|p1= [[Object]] or [[String]] - vehicle itself or a classname |= Parameter 1
ARRAY of ARRAYS in format [role,index],e.g. [["Driver",[]],["Turret",[0,1]],["Cargo",[0]]]
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
| [[Array]] - to format <nowiki>[</nowiki>[role, path], [role, path], …] like this:
<code>[
["Driver",[]],
["Turret",[0]],
["Turret",[0,0]],
["Cargo",[0]],
["Cargo",[1]],
(…)
]</code> |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_vehicleRoles]]; --> |= Syntax
|x1= <code>[[cursorObject]] [[call]] [[BIS_fnc_vehicleRoles]];</code> |= Example 1


|p1= |= Parameter 1
|x2= <code>"B_MBT_01_cannon_F" [[call]] [[BIS_fnc_vehicleRoles]];</code> |= Example 2
 
| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=
| [[BIS_fnc_moveIn]], [[assignedVehicleRole]], [[weaponsTurret]] |= See also
____________________________________________________________________________________________
 
| |= See also
 
}}
}}



Revision as of 00:51, 6 May 2018

Hover & click on the images for description

Description

Description:
Returns vehicle roles.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
vehicle call BIS_fnc_vehicleRoles
Parameters:
Object or String - vehicle itself or a classname
Return Value:
Array - to format [[role, path], [role, path], …] like this: [ ["Driver",[]], ["Turret",[0]], ["Turret",[0,0]], ["Cargo",[0]], ["Cargo",[1]], (…) ]

Examples

Example 1:
cursorObject call BIS_fnc_vehicleRoles;
Example 2:
"B_MBT_01_cannon_F" call BIS_fnc_vehicleRoles;

Additional Information

See also:
BIS_fnc_moveInassignedVehicleRoleweaponsTurret

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