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
| Variable | Type | Description |
|---|---|---|
@evPlayer | player value | Gets the player who is attempting to leave the hazard. |
*evHazard | reference to Hazard object | Gets the hazard the player is attempting to leave. |
$evIsAllowed | bool value | Gets 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. |