allTurrets: Difference between revisions
Jump to navigation
Jump to search
m (Bot: Reverted to revision 108914 by killzone_kid on 2018-07-22T19:20:34Z) |
m (template:command argument fix) |
||
Line 8: | Line 8: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|Returns array of available turret paths from vehicle object. To look up turrets from config, use [[BIS_fnc_allTurrets]]|= | |Returns array of available turret paths from vehicle object. To look up turrets from config, use [[BIS_fnc_allTurrets]]|DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|'''allTurrets''' vehicle|= | |'''allTurrets''' vehicle|SYNTAX= | ||
|p1 = vehicle: [[Object]] | |p1 = vehicle: [[Object]] | ||
| [[Array]] |= | | [[Array]] |RETURNVALUE= |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|s2='''allTurrets''' [vehicle, personTurrets]|= | |s2='''allTurrets''' [vehicle, personTurrets]|SYNTAX= | ||
|p21 = [vehicle, personTurrets]: [[Array]] | |p21 = [vehicle, personTurrets]: [[Array]] | ||
|p22 = vehicle: [[Object]] | |p22 = vehicle: [[Object]] | ||
Line 21: | Line 21: | ||
* [[true]] - include person (cargo) FFV (firing from vehicle) turrets | * [[true]] - include person (cargo) FFV (firing from vehicle) turrets | ||
* [[false]] - exclude person (cargo) FFV turrets | * [[false]] - exclude person (cargo) FFV turrets | ||
|r2= [[Array]] |= | |r2= [[Array]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1 = <code>_turretPaths = [[allTurrets]] SlammerUP; //<nowiki>[</nowiki>[0],[0,0]] | |x1 = <code>_turretPaths = [[allTurrets]] SlammerUP; //<nowiki>[</nowiki>[0],[0,0]] | ||
_turretPaths = [[allTurrets]] [SlammerUP, [[true]]]; //<nowiki>[</nowiki>[0],[0,0]] <- Commander turret is also FFV turret | _turretPaths = [[allTurrets]] [SlammerUP, [[true]]]; //<nowiki>[</nowiki>[0],[0,0]] <- Commander turret is also FFV turret | ||
_turretPaths = [[allTurrets]] [SlammerUP, [[false]]]; //<nowiki>[</nowiki>[0]]</code> |= | _turretPaths = [[allTurrets]] [SlammerUP, [[false]]]; //<nowiki>[</nowiki>[0]]</code> |EXAMPLE1= | ||
|x2 = Return FFV turrets only: <code>_FFVTurrets = [[allTurrets]] [tank, [[true]]] - [[allTurrets]] [tank, [[false]]]; </code> |= | |x2 = Return FFV turrets only: <code>_FFVTurrets = [[allTurrets]] [tank, [[true]]] - [[allTurrets]] [tank, [[false]]]; </code> |EXAMPLE2= | ||
| [[moveInTurret]], [[enablePersonTurret]], [[assignedVehicleRole]], [[fullCrew]], [[turretUnit]], [[turretLocal]], [[turretOwner]], [[BIS_fnc_allTurrets]] |= | | [[moveInTurret]], [[enablePersonTurret]], [[assignedVehicleRole]], [[fullCrew]], [[turretUnit]], [[turretLocal]], [[turretOwner]], [[BIS_fnc_allTurrets]] |SEEALSO= | ||
}} | }} |
Revision as of 11:25, 7 April 2019
Description
- Description:
- Returns array of available turret paths from vehicle object. To look up turrets from config, use BIS_fnc_allTurrets
- Groups:
- Uncategorised
Syntax
Alternative Syntax
- Syntax:
- allTurrets [vehicle, personTurrets]
- Parameters:
- [vehicle, personTurrets]: Array
- vehicle: Object
- personTurrets: Boolean
- 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
- See also:
- moveInTurretenablePersonTurretassignedVehicleRolefullCrewturretUnitturretLocalturretOwnerBIS_fnc_allTurrets
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
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;