Difference between revisions of "isAbleToBreathe"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Text replacement - " {2,}\}\}" to " }}")
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|= Comments
+
{{Command
____________________________________________________________________________________________
 
  
| arma3 |Game name=
+
| arma3
  
|0.50|Game version=
+
|0.50
____________________________________________________________________________________________
 
  
| If unit is diving and doesn't have a re-breather, it returns [[false]]. Diving means the unit's head is underwater. If unit is underwater and has a re-breather, the command returns [[true]]. |DESCRIPTION=
+
|gr1= Object Manipulation
____________________________________________________________________________________________
 
  
| '''isAbleToBreathe''' unit |SYNTAX=
+
| If unit is diving and doesn't have a re-breather, it returns [[false]]. Diving means the unit's head is underwater. If unit is underwater and has a re-breather, the command returns [[true]].
  
|p1= unit: [[Object]]  |PARAMETER1=
+
| '''isAbleToBreathe''' unit
  
| [[Boolean]] |RETURNVALUE=
+
|p1= unit: [[Object]]
  
 +
| [[Boolean]]
  
|x1= <code>_canBreath = [[isAbleToBreathe]] [[player]];</code>|EXAMPLE1=
+
|x1= <code>_canBreath = [[isAbleToBreathe]] [[player]];</code>
  
____________________________________________________________________________________________
+
|[[underwater]]
 
 
|[[underwater]] |SEEALSO=
 
 
 
|  |MPBEHAVIOUR=
 
____________________________________________________________________________________________
 
 
}}
 
}}
  
<h3 style='display:none'>Notes</h3>
 
<dl class='command_description'>
 
<!-- Note Section BEGIN -->
 
 
<!-- Note Section END -->
 
</dl>
 
  
<h3 style='display:none'>Bottom Section</h3>
+
{{GameCategory|arma3|New Scripting Commands}}
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
+
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
  

Latest revision as of 23:56, 18 January 2021

Introduced with Arma 3 version 0.500.50
Hover & click on the images for descriptions

Description

Description:
If unit is diving and doesn't have a re-breather, it returns false. Diving means the unit's head is underwater. If unit is underwater and has a re-breather, the command returns true.

Syntax

Syntax:
isAbleToBreathe unit
Parameters:
unit: Object
Return Value:
Boolean

Examples

Example 1:
_canBreath = isAbleToBreathe player;

Additional Information

See also:
underwater
Groups:
Object Manipulation

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.
Posted on May 6, 2019 - 19:43 (UTC)
vabene1111
Might return false if player enters a vehicle while underwater.