setOpticsMode: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 2: | Line 2: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.10 | |||
|branch= dev | |branch= dev | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
|descr= Sets the optic mode of the current weapon to the given class name or the index. Class name should be defined in the OpticsModes config class of the optic, index is the 0-based order of the optic modes with 0 being the default optic mode. | |descr= Sets the optic mode of the current weapon to the given class name or the index. Class name should be defined in the OpticsModes config class of the optic, index is the 0-based order of the optic modes with 0 being the default optic mode. | ||
|s1= unit [[ | |||
|s1= unit [[setOpticsMode]] modeClassNameOrIndex | |||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
Line 16: | Line 18: | ||
|x1= <sqf>player setOpticsMode "Hamr2Scope"; // Default optic mode for optic_Hamr</sqf> | |x1= <sqf>player setOpticsMode "Hamr2Scope"; // Default optic mode for optic_Hamr</sqf> | ||
|x2= <sqf>player setOpticsMode 0;</sqf> | |x2= <sqf>player setOpticsMode 0;</sqf> | ||
|seealso= [[getOpticsMode]] | |seealso= [[getOpticsMode]] | ||
}} | }} |
Revision as of 10:53, 24 March 2022
Description
- Description:
- Sets the optic mode of the current weapon to the given class name or the index. Class name should be defined in the OpticsModes config class of the optic, index is the 0-based order of the optic modes with 0 being the default optic mode.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- unit setOpticsMode modeClassNameOrIndex
- Parameters:
- unit: Object
- modeClassNameOrIndex: String or Number - Class name defined in the OpticsModes config class of the optic. Or the 0-based order of the optic modes with 0 being the default optic mode.
- Return Value:
- Nothing
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- getOpticsMode
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