getTurretLimits: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (2.12 released, no longer only dev branch)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.12
|version1= 2.12
|branch= dev


|arg= global
|arg= global
Line 24: Line 23:
* overridden: [[Boolean]] - if custom limits were applied
* overridden: [[Boolean]] - if custom limits were applied


|x1= <sqf>_limits = m2 getTurretLimits [0];</sqf>
|x1= <sqf>
private _turretLimits = m2 getTurretLimits [0];
_turretLimits params ["_minTurn", "_maxTurn", "_minElev", "_maxElev", "_overridden"];
</sqf>


|seealso= [[setTurretLimits]] [[setTurretOpticsMode]] [[turretLocal]] [[selectWeaponTurret]]
|seealso= [[setTurretLimits]] [[setTurretOpticsMode]] [[turretLocal]] [[selectWeaponTurret]]
}}
}}

Latest revision as of 15:41, 28 February 2023

Hover & click on the images for description

Description

Description:
Returns the rotation and elevation limits for the given turret.
Groups:
Turrets

Syntax

Syntax:
vehicle getTurretLimits turret
Parameters:
vehicle: Object - vehicle the turret belongs to
turret: Array - turret path
Return Value:
Array in format [minTurn, maxTurn, minElev, maxElev, overridden], where:
  • minTurn: Number - from 0 to -angle in degrees (left)
  • maxTurn: Number - from 0 to +angle in degrees (right)
  • minElev: Number - from 0 to -angle in degrees (down)
  • maxElev: Number - from 0 to +angle in degrees (up)
  • overridden: Boolean - if custom limits were applied

Examples

Example 1:
private _turretLimits = m2 getTurretLimits [0]; _turretLimits params ["_minTurn", "_maxTurn", "_minElev", "_maxElev", "_overridden"];

Additional Information

See also:
setTurretLimits setTurretOpticsMode turretLocal selectWeaponTurret

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