Events
Triggerable occurrences based on external factors.
The event system is a helpful alternative for Skript implementations in domains where triggers need to be run based on regular circumstances.
Event triggers are not unique and will be called across all scripts, with certain pre-provided values.
The purpose of the event system is to act as a 'watcher' for state changes.
Event Structure
The basic event structure looks similar to a no-parameters function. The my event
part would be replaced with the event's syntax name.
This is an example of the on any [script] load
event, which is triggered whenever a script is loaded into the environment.
Unlike functions, a single script can contain duplicate event receivers.
Event Values
Events can provide special values related to this specific event. These are found as special properties of the event
object, accessible via event-thing
.
Some events might provide changeable values.
Special Events
Some events may have special behaviour defined by their providing library.
The load
event triggers only in the script that is loaded, for example.
The load
event is different from the any load
event!
Last updated