Arma 3 Scripting

underwater

  • Arma 3 v0.50

Command · Markdown · JSON · original wiki page

Description

Returns whether the object is fully underwater.

Note

This command works well with Arma 3 mini-submarines, which was most likely the primary design goal.

Syntax

underwater object

Parameters:

Returns: Boolean - true if submerged

Examples

Example 1

private _isUnderwater = underwater vehicle player;

Example 2

private _isHeadUnderwater = eyePos player select 2 < 0;

See also

isTouchingGround · isAbleToBreathe

Community notes

Killzone_Kid

This command is quite buggy with objects other than mini-subs. Code in #Example 2 is a good alternative.