currentVisionMode

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 2: Operation Arrowhead version 1.51
  Arguments of this scripting command don't have to be local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Arma 2: Operation Arrowhead
Version:
1.51

Description

Description:
Returns current vision mode of unit's weapon.
  • 0 - daytime
  • 1 - night vision
  • 2 - thermal vision

Syntax

Syntax:
currentVisionMode unit
Parameters:
unit: Object
Return Value:
Number

Examples

Example 1:
_currMode = currentVisionMode gunner _tank
Example 2:
if (currentVisionMode player == 1) then { hint "nightvision active"; };

Additional Information

Multiplayer:
-
See also:
disableNVGEquipmentdisableTIEquipmentcamUseNVGsetCamUseTIcurrentMagazinecurrentWeaponcurrentMuzzlecurrentWeaponModecurrentZeroingmagazinesTurretweaponsTurret

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section

Posted on April 29, 2016 - 21:31 (UTC)
AgentRev
The 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...