BIS fnc vehicleRoles: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>(\[?[^\[]+\]?) *(\[\[)?(call|spawn)(\]\])? *(\[\[)?(BI(N|S)_fnc_[a-zA-Z0-9_]+)(\]\])?;?<\/code>" to "<sqf>$1 $3 $6;</sqf>")
m (Fix SQF)
 
(One intermediate revision by the same user not shown)
Line 12: Line 12:


|r1= [[Array]] - to format [<nowiki/>[role, path], [role, path], …] like this:
|r1= [[Array]] - to format [<nowiki/>[role, path], [role, path], …] like this:
<code>[
<sqf>[
["Driver",[]],
["Driver",[]],
["Turret",[0]],
["Turret",[0]],
Line 18: Line 18:
["Cargo",[0]],
["Cargo",[0]],
["Cargo",[1]],
["Cargo",[1]],
(…)
// ...
]</code>
]</sqf>


|x1= <sqf>cursorObject call BIS_fnc_vehicleRoles;</sqf>
|x1= <sqf>cursorObject call BIS_fnc_vehicleRoles;</sqf>

Latest revision as of 17:58, 1 November 2022

Hover & click on the images for description

Description

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

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_moveIn assignedVehicleRole weaponsTurret

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