Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:2.11

Description

Description:Returns the zoom range for the unit weapon.

Syntax

Syntax:unit getMuzzleOpticsZoom type
Parameters:
  • unit: Object - Unit to check.
  • type: String - Type of weapon to inquire about. Can be: "PRIMARY", "SECONDARY", "HANDGUN", or "BINOCULAR".
Return Value:Array - Contains maximum and minimum zoom levels. The numbers returned correspond to the getCameraFOV factors, where a smaller number means a higher zoom level. For weapons without optics, [0.25,0.75] is returned. If a unit does not have the specified weapon type, then nil is returned.

Examples

Examples:
_maxZoom = (player getMuzzleOpticsZoom "primary") select 0

Additional Information

See also: getCameraFOV, opticsState, getMuzzleInfo, muzzles
Multiplayer: 
Problems: 

Notes