setOpticsMode: Difference between revisions
Lou Montana (talk | contribs) m (Add syntax) |
BrettMayson (talk | contribs) mNo edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 4: | Line 4: | ||
|version1= 2.10 | |version1= 2.10 | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| Line 17: | 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 | ||
Latest revision as of 10:01, 2 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