Skip to main content

LeavingHazard

Gets called when player is leaving any environmental hazard.

Start a script section

!-- OnEvent LeavingHazard
-- require @evPlayer *evHazard $evIsAllowed

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: Yes
  • Event data: PlayerLeavingHazardEventArgs

Injected variables

VariableTypeDescription
@evPlayerplayer valueGets the player who is attempting to leave the hazard.
*evHazardreference to Hazard objectGets the hazard the player is attempting to leave.
$evIsAllowedbool valueGets or sets whether the player is allowed to leave the hazard. Setting this to false will result in player keeping the hazard effects and the event will be fired again until it is allowed or the player is back within the hazard's range.