{"name":"currentVisionMode","title":"currentVisionMode","type":"command","url":"https://community.bistudio.com/wiki/currentVisionMode","revid":378560,"updated":"2026-05-08T13:11:39Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns current vision mode of unit's weapon. Vision mode could be one of:\n\n- 0 - normal vision\n- 1 - night vision\n- 2 - thermal vision\n\nAlternative syntaxes additionally return FLIR index (see setCamUseTI) of the thermal vision mode (See also \"VisionModeChanged\" entity event handler)","syntaxes":[{"syntax":"currentVisionMode entity","params":[{"name":"entity","type":"Object","description":"unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"vision mode (0 on error, e.g on objNull)","text":"Number - vision mode (**0** on error, e.g on objNull)"},"form":"unary","right":{"text":"entity"}},{"syntax":"currentVisionMode [entity]","since":"arma3 2.08","params":[{"name":"entity","type":"Object","description":"unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"format [visionMode, flirIndex] where:\n- visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n\n- visionMode: Number\n- flirIndex: Number\n\n[-1, -1] on error"},"form":"unary","right":{"text":"[entity]"}},{"syntax":"vehicle currentVisionMode turretPath","since":"arma3 2.08","params":[{"name":"vehicle","type":"Object","description":"vehicle with vision modes","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"path to vehicle's turret. Use [-1] for driver turret, [] for default primary gunner turret","type_expr":"Turret Path"}],"returns":{"type":"Array","type_expr":"Array","description":"format [visionMode, flirIndex] where:\n- visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n\n- visionMode: Number\n- flirIndex: Number\n\n[-1, -1] on error"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}},{"syntax":"unit currentVisionMode weapon","since":"arma3 2.08","params":[{"name":"unit","type":"Object","description":"soldier","type_expr":"Object"},{"name":"weapon","type":"String","description":"unit's weapon. Use \"\" for current weapon","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"format [visionMode, flirIndex] where:\n- visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n\n- visionMode: Number\n- flirIndex: Number\n\n[-1, -1] on error"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}}],"examples":[{"code":["_visionMode = currentVisionMode gunner _tank;"]},{"text":"```sqf\nif (currentVisionMode player == 1) then\n{\n    hint \"nightvision active\";\n};\n```","code":["if (currentVisionMode player == 1) then\n{\n\thint \"nightvision active\";\n};"]},{"code":["private _detailedVisionMode = currentVisionMode [gunner _tank];\n_detailedVisionMode params [\"_mode\", \"_flirIndex\"];"]},{"code":["private _detailedGunnerVisionMode = _tank currentVisionMode [0];"]},{"code":["private _detailedWeaponVisionMode = player currentVisionMode \"\";"]}],"see_also":["disableNVGEquipment","disableTIEquipment","camUseNVG","setCamUseTI","currentMagazine","currentWeapon","currentMuzzle","currentWeaponMode","currentZeroing","magazinesTurret","weaponsTurret"],"notes":[{"user":"AgentRev","date":"2016-04-29T21:31:00Z","text":"> [!CAUTION]\n> This information is **obsolete** as of Arma 3 v2.08.\n\nThe return value is somewhat erratic for UAVs. For example, if you are connected to a UAV, with the turret set to thermal vision and PIP feed enabled, `currentVisionMode gunner _uav` returns 2 when controlling the turret, but returns 0 after releasing control, even thought the PIP feed is still in thermal mode. With nightvision, it will return 1 whether or not you are controlling the turret, but if you switch from 1st to 3rd person before releasing control, then it returns 0 afterwards..."}]}