BIS fnc vehicleRoles: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|gr([0-9]+) = " to "|gr$1= ") |
Lou Montana (talk | contribs) m (Fix SQF) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 1.00 | |||
|version1 = 1.00 | |||
|gr1= Vehicles | |gr1= Vehicles | ||
Line 13: | Line 12: | ||
|r1= [[Array]] - to format [<nowiki/>[role, path], [role, path], …] like this: | |r1= [[Array]] - to format [<nowiki/>[role, path], [role, path], …] like this: | ||
< | <sqf>[ | ||
["Driver",[]], | ["Driver",[]], | ||
["Turret",[0]], | ["Turret",[0]], | ||
Line 19: | Line 18: | ||
["Cargo",[0]], | ["Cargo",[0]], | ||
["Cargo",[1]], | ["Cargo",[1]], | ||
// ... | |||
]</ | ]</sqf> | ||
|x1= < | |x1= <sqf>cursorObject call BIS_fnc_vehicleRoles;</sqf> | ||
|x2= < | |x2= <sqf>"B_MBT_01_cannon_F" call BIS_fnc_vehicleRoles;</sqf> | ||
|seealso= [[BIS_fnc_moveIn]] | |seealso= [[BIS_fnc_moveIn]] [[assignedVehicleRole]] [[weaponsTurret]] | ||
}} | }} |
Latest revision as of 16:58, 1 November 2022
Description
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:
- Example 2:
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