{"name":"getOpticsMode","operator":null,"title":"getOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/getOpticsMode","revid":348464,"updated":"2023-11-08T13:00:19Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.10"}],"since":{"game":"arma3","name":"Arma 3","version":"2.10"},"arma3_since":"2.10","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the class name of the current optic mode of the current weapon.","syntaxes":[{"syntax":"unit getOpticsMode slot","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"},{"name":"slot","type":"Number","optional":false,"default":null,"description":"can be one of:\n- 0 - Current weapon\n- 1 - Primary weapon\n- 2 - Secondary weapon\n- 3 - Handgun","types":["Number"],"since":null,"text":"slot: Number - can be one of:\n- 0 - Current weapon\n- 1 - Primary weapon\n- 2 - Secondary weapon\n- 3 - Handgun"}],"returns":{"type":"String","types":["String"],"description":"class name of the current optic mode of the current weapon","text":"String - class name of the current optic mode of the current weapon"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"slot","types":["Number"]}}],"examples":[{"text":"```sqf\nplayer getOpticsMode 0; // get current weapon's optic mode\nplayer getOpticsMode 1; // get primary weapon's optic mode\nplayer getOpticsMode 2; // get launcher's optic mode\nplayer getOpticsMode 3; // get handgun's optic mode\n```","code":["player getOpticsMode 0; // get current weapon's optic mode\nplayer getOpticsMode 1; // get primary weapon's optic mode\nplayer getOpticsMode 2; // get launcher's optic mode\nplayer getOpticsMode 3; // get handgun's optic mode"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setOpticsMode"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 2.10","Scripting Commands"]}