setOpticsMode: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "\|branch= *dev " to "") |
BrettMayson (talk | contribs) mNo edit summary |
||
| Line 16: | Line 16: | ||
* [[String]] - class name defined in the optic's {{hl|OpticsModes}} config class | * [[String]] - class name defined in the optic's {{hl|OpticsModes}} config class | ||
* [[Number]] - 0-based index of the optic mode with 0 being the default optic mode | * [[Number]] - 0-based index of the optic mode with 0 being the default optic mode | ||
* [[Array]] | * [[Array]] with [slotIndex, opticsModeIndexOrClassName]: | ||
** slotIndex: [[Number]], can be one of: | ** slotIndex: [[Number]], can be one of: | ||
*** 0 - Current weapon | *** 0 - Current weapon | ||
Revision as of 09:58, 1 January 2026
Description
- Description:
- Sets the optic mode of the current weapon to the given class name or the index.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- unit setOpticsMode mode
- Parameters:
- unit: Object
- mode: String, Number or Array:
- Return Value:
- Nothing
Examples
- Example 1:
- Example 2:
- Example 3:
Additional Information
- See also:
- getOpticsMode
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note