currentVisionMode: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "</dd> </dl>" to "</dd> </dl>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma2oa | |game1= arma2oa | ||
|1.51 | |version1= 1.51 | ||
|game2= tkoh | |game2= tkoh | ||
Line 14: | Line 14: | ||
|gr1= Weapons | |gr1= Weapons | ||
| Returns current vision mode of unit's weapon. | |descr= Returns current vision mode of unit's weapon. | ||
* 0 - | |s1= [[currentVisionMode]] unit | ||
|p1= unit: [[Object]] | |||
|r1= [[Number]] - can be one of: | |||
* 0 - bare eye | |||
* 1 - night vision | * 1 - night vision | ||
* 2 - thermal vision | * 2 - thermal vision | ||
| | |x1= <code>_currMode = [[currentVisionMode]] [[gunner]] _tank</code> | ||
| | |x2= <code>[[if]] ([[currentVisionMode]] [[player]] == 1) [[then]] | ||
{ | { | ||
hint "nightvision active"; | [[hint]] "nightvision active"; | ||
}; | }; | ||
</code> | </code> | ||
| [[disableNVGEquipment]], [[disableTIEquipment]], [[camUseNVG]], [[setCamUseTI]], [[currentMagazine]], [[currentWeapon]], [[currentMuzzle]], [[currentWeaponMode]], [[currentZeroing]], [[magazinesTurret]], [[weaponsTurret]] | |seealso= [[disableNVGEquipment]], [[disableTIEquipment]], [[camUseNVG]], [[setCamUseTI]], [[currentMagazine]], [[currentWeapon]], [[currentMuzzle]], [[currentWeaponMode]], [[currentZeroing]], [[magazinesTurret]], [[weaponsTurret]] | ||
}} | }} | ||
<dl class="command_description"> | <dl class="command_description"> |
Revision as of 18:18, 13 June 2021
Description
- Description:
- Returns current vision mode of unit's weapon.
- Groups:
- Weapons
Syntax
- Syntax:
- currentVisionMode unit
- Parameters:
- unit: Object
- Return Value:
- Number - can be one of:
- 0 - bare eye
- 1 - night vision
- 2 - thermal vision
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
- 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...