allTurrets: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 29: | Line 29: | ||
|x1= <sqf> | |x1= <sqf> | ||
_turretPaths = allTurrets _mySlammerUP; // [[0],[0,0]] | _turretPaths = allTurrets _mySlammerUP; // [[0],[0,0]] | ||
_turretPaths = allTurrets [_mySlammerUP, true]; // [[0],[0,0]] < - commander turret is also an FFV turret | _turretPaths = allTurrets [_mySlammerUP, true]; // [[0],[0,0]] <- commander turret is also an FFV turret | ||
_turretPaths = allTurrets [_mySlammerUP, false]; // [[0]] | _turretPaths = allTurrets [_mySlammerUP, false]; // [<nowiki/>[0]] | ||
</sqf> | </sqf> | ||
Line 40: | Line 40: | ||
{{Note | {{Note | ||
|user= | |user= AgentRev | ||
|timestamp= 20160413191300 | |timestamp= 20160413191300 | ||
|text= The first syntax (vehicle only without boolean) will include commander turrets like in the example, and does not include actual FFV turrets like offroad back seats, as expected.<br> | |text= The first syntax (vehicle only without boolean) will include commander turrets like in the example, and does not include actual FFV turrets like offroad back seats, as expected.<br> |
Latest revision as of 20:15, 7 April 2024
Description
- Description:
- Returns array of available turret paths from vehicle object.
- Groups:
- Turrets
Syntax
- Syntax:
- allTurrets vehicle
- Parameters:
- vehicle: Object
- Return Value:
- Array of Arrays format Turret Path
Alternative Syntax
- Syntax:
- allTurrets [vehicle, includeFFV]
- Parameters:
- vehicle: Object
- includeFFV: Boolean - true to include FFV (Firing From Vehicle) positions, false to exclude them
- Return Value:
- Array of Arrays format Turret Path
Examples
- Example 1:
- Example 2:
- Return FFV turrets only:
Additional Information
- See also:
- moveInTurret enablePersonTurret assignedVehicleRole fullCrew turretUnit turretLocal turretOwner BIS_fnc_allTurrets BIS_fnc_turretConfig
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
- Posted on Apr 13, 2016 - 19:13 (UTC)
-
The first syntax (vehicle only without boolean) will include commander turrets like in the example, and does not include actual FFV turrets like offroad back seats, as expected.
Also, the driver turret [-1] is never included in the results, which can be solved as follows: