setTurretOpticsMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add seeAlso)
No edit summary
Line 18: Line 18:
|p1= obj: [[Object]]
|p1= obj: [[Object]]


|p2= mode: [[Number]] or [[Array]] - optic mode index or [turretPath, opticModeIndex]
|p2= mode: [[Number]] - optic mode index


|r1= [[Nothing]]
|r1= [[Nothing]]
|s2= obj [[setTurretOpticsMode]] [turretPath, opticModeIndex]
|p21= obj: [[Object]]
|p22= turretPath: [[Array]]
|p23= opticModeIndex: [[Number]] - optic mode index
|r2= [[Nothing]]


|x1= <sqf>player setTurretOpticsMode 0;</sqf>
|x1= <sqf>player setTurretOpticsMode 0;</sqf>

Revision as of 22:21, 23 May 2022

Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.10.

Description

Description:
Set the current optics mode of the optics in the turret occupied by the specified unit. Alt syntax allows a vehicle and turret path to be specified instead of a unit.
Groups:
Turrets

Syntax

Syntax:
obj setTurretOpticsMode mode
Parameters:
obj: Object
mode: Number - optic mode index
Return Value:
Nothing

Alternative Syntax

Syntax:
obj setTurretOpticsMode [turretPath, opticModeIndex]
Parameters:
obj: Object
turretPath: Array
opticModeIndex: Number - optic mode index
Return Value:
Nothing

Examples

Example 1:
player setTurretOpticsMode 0;
Example 2:
myTank setTurretOpticeMode [[-1], 1];
Example 3:
myAircraft setTurretOpticsMode [[0, 0], 0];

Additional Information

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