IfWaterLevel

From ZDoom Wiki
Jump to navigation Jump to search

IfWaterLevel [not] <value>


Executes the following sub block if the player's waterlevel is greater than or equal to value. If not is provided, the check is inverted, and the sub block is executed if the player's waterlevel is less than value.

Examples

This block of code is executed if the player is completely submerged in water.

IfWaterLevel 3
{
  // commands...
}


This one, however, is executed if the player is not submerged at all.

IfWaterLevel not 1
{
  // commands...
}