setTurretLimits: 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)
 
(3 intermediate revisions by one other user not shown)
Line 8: Line 8:
|eff= global
|eff= global


|descr= Set the rotation and elevation limits for the given turret. The limits can only be set within the limits defined in config and cannot exceed them. To reset to config defaults pass the turret argument only (Example 2).
|descr= Sets the rotation and elevation limits for the given turret. The limits can only be set within the limits defined in config and cannot exceed them. To reset to config defaults pass the turret argument only (Example 2).


|gr1= Turrets
|gr1= Turrets
Line 14: Line 14:
|s1= vehicle [[setTurretLimits]] [turret, minTurn, maxTurn, minElev, maxElev]
|s1= vehicle [[setTurretLimits]] [turret, minTurn, maxTurn, minElev, maxElev]


|p1= vehicle: [[Object]] vehicle the turret belongs to
|p1= vehicle: [[Object]] - vehicle the turret belongs to


|p2= turret: [[Array]] - turret path
|p2= turret: [[Array]] - turret path

Latest revision as of 15:44, 28 February 2023

Hover & click on the images for description

Description

Description:
Sets the rotation and elevation limits for the given turret. The limits can only be set within the limits defined in config and cannot exceed them. To reset to config defaults pass the turret argument only (Example 2).
Groups:
Turrets

Syntax

Syntax:
vehicle setTurretLimits [turret, minTurn, maxTurn, minElev, maxElev]
Parameters:
vehicle: Object - vehicle the turret belongs to
turret: Array - turret path
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)
Return Value:
Nothing

Examples

Example 1:
m2 setTurretLimits [[0], -45, 45, -10, 10];
Example 2:
m2 setTurretLimits [[0]]; //reset

Additional Information

See also:
getTurretLimits 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