currentVisionMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2oa |Game name=
| arma2oa


|1.51|Game version=
|1.51


|arg= global |Multiplayer Arguments=
|arg= global


|gr1= Weapons |GROUP1=
|gr1= Weapons


| Returns current vision mode of unit's weapon.
| Returns current vision mode of unit's weapon.
Line 13: Line 13:
* 0 - daytime
* 0 - daytime
* 1 - night vision
* 1 - night vision
* 2 - thermal vision |DESCRIPTION=
* 2 - thermal vision


| '''currentVisionMode''' unit |SYNTAX=
| '''currentVisionMode''' unit


|p1= unit: [[Object]] |PARAMETER1=
|p1= unit: [[Object]]


| [[Number]] |RETURNVALUE=
| [[Number]]
   
   
|x1= <code>_currMode <nowiki>=</nowiki> '''currentVisionMode''' gunner _tank</code> |EXAMPLE1=
|x1= <code>_currMode <nowiki>=</nowiki> '''currentVisionMode''' gunner _tank</code>
|x2= <code>if ('''currentVisionMode''' player <nowiki>==</nowiki> 1) then
|x2= <code>if ('''currentVisionMode''' player <nowiki>==</nowiki> 1) then
{
{
hint "nightvision active";
hint "nightvision active";
};
};
</code> |EXAMPLE2=
</code>


| [[disableNVGEquipment]], [[disableTIEquipment]], [[camUseNVG]], [[setCamUseTI]], [[currentMagazine]], [[currentWeapon]], [[currentMuzzle]], [[currentWeaponMode]], [[currentZeroing]], [[magazinesTurret]], [[weaponsTurret]] |SEEALSO=
| [[disableNVGEquipment]], [[disableTIEquipment]], [[camUseNVG]], [[setCamUseTI]], [[currentMagazine]], [[currentWeapon]], [[currentMuzzle]], [[currentWeaponMode]], [[currentZeroing]], [[magazinesTurret]], [[weaponsTurret]]
    
    
}}
}}

Revision as of 00:29, 18 January 2021

Hover & click on the images for description

Description

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

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

See also:
disableNVGEquipmentdisableTIEquipmentcamUseNVGsetCamUseTIcurrentMagazinecurrentWeaponcurrentMuzzlecurrentWeaponModecurrentZeroingmagazinesTurretweaponsTurret

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

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...