currentVisionMode: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " 1.51" to " 1.50") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
|gr1= Weapons | |gr1= Weapons | ||
|descr= Returns current vision mode of unit's weapon. | |descr= Returns current vision mode of unit's weapon. Vision mode could be one of: | ||
* 0 - normal vision | |||
* 1 - night vision | |||
* 2 - thermal vision | |||
Alternative syntaxes additionally return FLIR index (see [[setCamUseTI]]) of the thermal vision mode (See also [[Arma_3:_Event_Handlers#VisionModeChanged | "VisionModeChanged"]] entity event handler) | |||
|s1= [[currentVisionMode]] entity | |||
| | |p1= entity: [[Object]] - unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode | ||
| | |r1= [[Number]] - vision mode | ||
| | |s2= [[currentVisionMode]] [entity] ''Since Arma 3 v2.07.148193'' | ||
|p21= entity: [[Object]] - unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode | |||
|r2= [[Array]] - in format [vision mode, FLIR index] | |||
|s3= vehicle [[currentVisionMode]] turret ''Since Arma 3 v2.07.148193'' | |||
|p41= vehicle: [[Object]] - vehicle with vision modes | |||
|p42= turret: [[Array]] - path to turret. Use [-1] for driver turret, [] for default primary gunner turret | |||
|r3= [[Array]] - in format [vision mode, FLIR index] | |||
|s4= unit [[currentVisionMode]] weapon ''Since Arma 3 v2.07.148193'' | |||
|p61= unit: [[Object]] - soldier | |||
|p62= weapon: [[String]] - units weapon. Use "" for current weapon | |||
|r4= [[Array]] - in format [vision mode, FLIR index] | |||
|x1= <code>_currMode = [[currentVisionMode]] [[gunner]] _tank</code> | |x1= <code>_currMode = [[currentVisionMode]] [[gunner]] _tank</code> |
Revision as of 07:28, 11 September 2021
Description
- Description:
- Returns current vision mode of unit's weapon. Vision mode could be one of:
- 0 - normal vision
- 1 - night vision
- 2 - thermal vision
- Groups:
- Weapons
Syntax 1
- Syntax:
- currentVisionMode entity
- Parameters:
- entity: Object - unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode
- Return Value:
- Number - vision mode
Syntax 2
- Syntax:
- currentVisionMode [entity] Since Arma 3 v2.07.148193
- Parameters:
- entity: Object - unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode
- Return Value:
- Array - in format [vision mode, FLIR index]
Syntax 3
- Syntax:
- vehicle currentVisionMode turret Since Arma 3 v2.07.148193
- Parameters:
- vehicle: Object - vehicle with vision modes
- turret: Array - path to turret. Use [-1] for driver turret, [] for default primary gunner turret
- Return Value:
- Array - in format [vision mode, FLIR index]
Syntax 4
- Syntax:
- unit currentVisionMode weapon Since Arma 3 v2.07.148193
- Parameters:
- unit: Object - soldier
- weapon: String - units weapon. Use "" for current weapon
- Return Value:
- Array - in format [vision mode, FLIR index]
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...