Arma 3 Scripting

surfaceIsWater

  • Arma 3 v0.50
  • First in Operation Flashpoint: Elite v1.00

Command · Markdown · JSON · original wiki page

Description

Returns whether there is water at given position. In Arma 3, it also detects pond objects, but only if they are loaded in memory (normally only true if the objects are within the object view distance)

Syntax

surfaceIsWater position

Parameters:

Returns: Boolean

Examples

Example 1

private _result = surfaceIsWater [1000, 3000];

Example 2

_isWater = surfaceIsWater position player;

See also

surfaceType · surfaceNormal · nearRoads · roadsConnectedTo · roadAt · isOnRoad

Community notes

Osmo

Does not work with inland water. Works only with sea water.

Leopard20

The above note is not true in Arma 3. The command does detect pond objects and will return true if there is a pond object at that position. However, the object must have been loaded in memory (normally only true if the object is within the object view distance)