allTurrets

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.34
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.34

Description

Description:
Returns array of available turret paths from vehicle object. To look up turrets from config, use BIS_fnc_allTurrets

Syntax

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

Alternative Syntax

Syntax:
allTurrets [vehicle, personTurrets]
Parameters:
[vehicle, personTurrets]: Array
vehicle: Object
personTurrets: Boolean
  • true - include person (cargo) FFV (firing from vehicle) turrets
  • false - exclude person (cargo) FFV turrets
Return Value:
Array

Examples

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

Additional Information

Multiplayer:
-
See also:
moveInTurretenablePersonTurretassignedVehicleRolefullCrewBIS_fnc_allTurrets

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section

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;