{"name":"getOpticsMode","title":"getOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/getOpticsMode","revid":348464,"updated":"2023-11-08T13:00:19Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns the class name of the current optic mode of the current weapon.","syntaxes":[{"syntax":"unit getOpticsMode slot","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"slot","type":"Number","description":"can be one of:\n\n- 0 - Current weapon\n- 1 - Primary weapon\n- 2 - Secondary weapon\n- 3 - Handgun","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String","description":"class name of the current optic mode of the current weapon"},"form":"binary","left":{"text":"unit"},"right":{"text":"slot"}}],"examples":[{"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"]}],"see_also":["setOpticsMode"]}