---
name: "getOpticsMode"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "2.10"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getOpticsMode
revid: 348464
updated: 2023-11-08T13:00:19Z
---

# getOpticsMode

*Command · Object Manipulation · Arma 3 v2.10*

## Description

Returns the class name of the current optic mode of the current weapon.

## Syntax

```sqf
unit getOpticsMode slot
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `slot`: [Number](../topics/Number.md) - can be one of:
  - 0 - [Current weapon](../commands/currentWeapon.md)
  - 1 - [Primary weapon](../commands/primaryWeapon.md)
  - 2 - [Secondary weapon](../commands/secondaryWeapon.md)
  - 3 - [Handgun](../commands/handgunWeapon.md)

**Returns:** [String](../topics/String.md) - class name of the current optic mode of the current weapon

## Examples

### Example 1

```sqf
player getOpticsMode 0; // get current weapon's optic mode
player getOpticsMode 1; // get primary weapon's optic mode
player getOpticsMode 2; // get launcher's optic mode
player getOpticsMode 3; // get handgun's optic mode
```

## See also

[setOpticsMode](../commands/setOpticsMode.md)

<sub>Source: [BI Community Wiki — getOpticsMode](https://community.bistudio.com/wiki/getOpticsMode) (revision 348464).</sub>
