{"name":"currentVisionMode","operator":null,"title":"currentVisionMode","type":"command","url":"https://community.bistudio.com/wiki/currentVisionMode","revid":378560,"updated":"2026-05-08T13:11:39Z","groups":["Weapons"],"status":"ok","replaced_by":[],"games":[{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns current vision mode of unit's weapon. Vision mode could be one of:\n- 0 - normal vision\n- 1 - night vision\n- 2 - thermal vision\nAlternative syntaxes additionally return FLIR index (see setCamUseTI) of the thermal vision mode (See also \"VisionModeChanged\" entity event handler)","syntaxes":[{"syntax":"currentVisionMode entity","since":null,"effect":null,"exec":null,"params":[{"name":"entity","type":"Object","optional":false,"default":null,"description":"unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode","types":["Object"],"since":null,"text":"entity: Object - unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode"}],"returns":{"type":"Number","types":["Number"],"description":"vision mode (0 on error, e.g on objNull)","text":"Number - vision mode (**0** on error, e.g on objNull)"},"form":"unary","operator":null,"left":null,"right":{"text":"entity","types":["Object"]}},{"syntax":"currentVisionMode [entity]","since":"arma3 2.08","effect":null,"exec":null,"params":[{"name":"entity","type":"Object","optional":false,"default":null,"description":"unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode","types":["Object"],"since":null,"text":"entity: Object - unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode"}],"returns":{"type":"Array format [visionMode, flirIndex] where:","types":["Array"],"description":"visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n- visionMode: Number\n- flirIndex: Number\n[-1, -1] on error"},"form":"unary","operator":null,"left":null,"right":{"text":"[entity]","types":["Array"]}},{"syntax":"vehicle currentVisionMode turretPath","since":"arma3 2.08","effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"vehicle with vision modes","types":["Object"],"since":null,"text":"vehicle: Object - vehicle with vision modes"},{"name":"turretPath","type":"Turret Path","optional":false,"default":null,"description":"path to vehicle's turret. Use [-1] for driver turret, [] for default primary gunner turret","types":["Turret Path"],"since":null,"text":"turretPath: Turret Path - path to vehicle's turret. Use [-1] for driver turret, [] for default primary gunner turret"}],"returns":{"type":"Array format [visionMode, flirIndex] where:","types":["Array"],"description":"visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n- visionMode: Number\n- flirIndex: Number\n[-1, -1] on error"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"turretPath","types":["Turret Path"]}},{"syntax":"unit currentVisionMode weapon","since":"arma3 2.08","effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"soldier","types":["Object"],"since":null,"text":"unit: Object - soldier"},{"name":"weapon","type":"String","optional":false,"default":null,"description":"unit's weapon. Use \"\" for current weapon","types":["String"],"since":null,"text":"weapon: String - unit's weapon. Use \"\" for current weapon"}],"returns":{"type":"Array format [visionMode, flirIndex] where:","types":["Array"],"description":"visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n- visionMode: Number\n- flirIndex: Number\n[-1, -1] on error"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"weapon","types":["String"]}}],"examples":[{"text":"```sqf\n_visionMode = currentVisionMode gunner _tank;\n```","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};"]},{"text":"```sqf\nprivate _detailedVisionMode = currentVisionMode [gunner _tank];\n_detailedVisionMode params [\"_mode\", \"_flirIndex\"];\n```","code":["private _detailedVisionMode = currentVisionMode [gunner _tank];\n_detailedVisionMode params [\"_mode\", \"_flirIndex\"];"]},{"text":"```sqf\nprivate _detailedGunnerVisionMode = _tank currentVisionMode [0];\n```","code":["private _detailedGunnerVisionMode = _tank currentVisionMode [0];"]},{"text":"```sqf\nprivate _detailedWeaponVisionMode = player currentVisionMode \"\";\n```","code":["private _detailedWeaponVisionMode = player currentVisionMode \"\";"]}],"multiplayer":null,"problems":null,"aliases":[],"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**. \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..."}],"categories":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Weapons","Introduced with Arma 2: Operation Arrowhead version 1.50","Scripting Commands","Take On Helicopters: Scripting Commands"]}