allTurrets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|( *\[\[[a-zA-Z]+\]\]) * \| *s2 *=" to "|r1=$1 |s2=")
m (Text replacement - " +<\/code>" to "</code>")
Line 33: Line 33:


|x2 = Return FFV turrets only:
|x2 = Return FFV turrets only:
<code>_FFVTurrets = [[allTurrets]] [tank, [[true]]] - [[allTurrets]] [tank, [[false]]]; </code>
<code>_FFVTurrets = [[allTurrets]] [tank, [[true]]] - [[allTurrets]] [tank, [[false]]];</code>


|seealso= [[moveInTurret]], [[enablePersonTurret]], [[assignedVehicleRole]], [[fullCrew]], [[turretUnit]], [[turretLocal]], [[turretOwner]], [[BIS_fnc_allTurrets]], [[BIS_fnc_turretConfig]]
|seealso= [[moveInTurret]], [[enablePersonTurret]], [[assignedVehicleRole]], [[fullCrew]], [[turretUnit]], [[turretLocal]], [[turretOwner]], [[BIS_fnc_allTurrets]], [[BIS_fnc_turretConfig]]

Revision as of 22:48, 10 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Turrets

Syntax

Syntax:
Syntax needed
Parameters:
vehicle: Object
Return Value:
Array

Alternative Syntax

Syntax:
allTurrets [vehicle, includeFFV]
Parameters:
[vehicle, includeFFV]: Array
vehicle: Object
includeFFV: Boolean - true to include FFV (Firing From Vehicle) positions, false to exclude them
Return Value:
Array

Examples

Example 1:
_turretPaths = allTurrets _mySlammerUP; // [[0],[0,0]] _turretPaths = allTurrets [_mySlammerUP, true]; // [[0],[0,0]] <- Commander turret is also an FFV turret _turretPaths = allTurrets [_mySlammerUP, false]; // [[0]]
Example 2:
Return FFV turrets only: _FFVTurrets = allTurrets [tank, true] - allTurrets [tank, false];

Additional Information

See also:
moveInTurretenablePersonTurretassignedVehicleRolefullCrewturretUnitturretLocalturretOwnerBIS_fnc_allTurretsBIS_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 April 13, 2016 - 19:13 (UTC)
AgentRev
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: _paths = [[-1]] + allTurrets _vehicle;