Difference between revisions of "isAbleToBreathe"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
+
{{RV|type=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>
  
____________________________________________________________________________________________
+
|seealso= [[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>
 
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
  
 
<!-- CONTINUE Notes -->
 
<!-- CONTINUE Notes -->

Latest revision as of 23:49, 16 February 2021

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

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 May 6, 2019 - 19:43 (UTC)
vabene1111
Might return false if player enters a vehicle while underwater.