-
Notifications
You must be signed in to change notification settings - Fork 0
Home
vinci6k edited this page Aug 31, 2022
·
4 revisions
Identifies how submerged in water a player is.
class WaterLevel(IntEnum):
NOT_IN_WATER = 0
FEET = 1
WAIST = 2
EYES = 3
Called when a player starts touching water.
from enki.listeners import OnPlayerEnterWater
@OnPlayerEnterWater
def on_player_enter_water(player):
print(f'{player.name} just got wet!')
Called when a player stops touching water.
from enki.listeners import OnPlayerExitWater
@OnPlayerExitWater
def on_player_exit_water(player):
print(f'{player.name} is no longer in water.')
Extended Player class with additional properties and methods.
Returns whether the player is currently in/touching water.
Enables walking on water for the player.
Disables walking on water for the player.
Fires a trace towards the player's feet, checking for water.
Returns: GameTrace() object containing trace data (see BaseTrace() for additional properties).