underwater: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|0.50 | |0.50 | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| Returns whether the object is fully underwater<br><br> | | Returns whether the object is fully underwater<br><br> | ||
{{Informative | This command works well with Arma 3 mini-submarines, which was the primary design goal most likely}} | {{Informative | This command works well with Arma 3 mini-submarines, which was the primary design goal most likely}} | ||
| '''underwater''' object | | '''underwater''' object | ||
|p1= object: [[Object]] - mini-submarine | |p1= object: [[Object]] - mini-submarine | ||
| [[Boolean]] - [[true]] if submerged | | [[Boolean]] - [[true]] if submerged | ||
|x1= <code>_isUnderwater = [[underwater]] [[vehicle]] [[player]];</code> | |x1= <code>_isUnderwater = [[underwater]] [[vehicle]] [[player]];</code> | ||
|x2= <code>_isUnderwater = [[eyePos]] [[player]] [[select]] 2 < 0;</code> | |x2= <code>_isUnderwater = [[eyePos]] [[player]] [[select]] 2 < 0;</code> | ||
| [[isTouchingGround]], [[isAbleToBreathe]] | | [[isTouchingGround]], [[isAbleToBreathe]] | ||
| | | | ||
}} | }} | ||
Revision as of 11:25, 18 January 2021
Description
- Description:
- Returns whether the object is fully underwater
- Groups:
- Object Manipulation
Syntax
- Syntax:
- underwater object
- Parameters:
- object: Object - mini-submarine
- Return Value:
- Boolean - true if submerged
Examples
- Example 1:
_isUnderwater = underwater vehicle player;
- Example 2:
_isUnderwater = eyePos player select 2 < 0;
Additional Information
- See also:
- isTouchingGroundisAbleToBreathe
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 February 2, 2017 - 18:08 (UTC)
- Killzone Kid
- This command is quite buggy with objects other than mini-subs. Code in Example 2 is a good alternative.