Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.02

Description

Description:Returns the oxygen level of a swimming / diving unit.

If the level is below 0.3, the screen border starts to pulse as a warning; and once the level reaches 0, the player dies (if injuries to the player are allowed, using allowDamage, then there are visual distortions when the player runs out of oxygen, even though they do not die).

As soon as a diving unit returns to the water surface, the oxygen level is reset to 1.

Syntax

Syntax:getOxygenRemaining unit
Parameters:
Return Value:Number - Remaining oxygen level (0-1) (default: 1).

Examples

Examples:_oxygen = getOxygenRemaining player

Additional Information

See also: damage
Multiplayer: 
Problems: 

Notes