{"name":"underwater","title":"underwater","type":"command","url":"https://community.bistudio.com/wiki/underwater","revid":336959,"updated":"2023-01-04T16:44:17Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns whether the object is fully underwater.\n\n> [!NOTE]\n> This command works well with Arma 3 mini-submarines, which was most likely the primary design goal.","syntaxes":[{"syntax":"underwater object","params":[{"name":"object","type":"Object","description":"mini-submarine","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if submerged"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["private _isUnderwater = underwater vehicle player;"]},{"code":["private _isHeadUnderwater = eyePos player select 2 < 0;"]}],"see_also":["isTouchingGround","isAbleToBreathe"],"notes":[{"user":"Killzone_Kid","date":"2017-02-02T18:08:00Z","text":"This command is quite buggy with objects other than mini-subs. Code in Example 2 is a good alternative."}]}