Loading Events
Events run when a script is loaded.
The core library contains two script loading events.

Any Load

1
on any [script] load
2
on any script load:
3
trigger:
4
print event-name + " was loaded"
Copied!
This is run whenever any script is loaded. This may be the current script or a different script. During initial start-up, scripts will not receive load events for other scripts loaded before them.
This is designed to catch the loading of 'lazy' scripts loaded while the program is already running.
Event Value
Type
Description
name
The name of the loaded script.
path
The full path of the loaded script in skript/path/script format.

Load

1
on [script] load
2
on script load:
3
trigger:
4
print "this script was loaded"
Copied!
This is run when this script is loaded. Other scripts will not receive this event.
This is designed to be a start-up entry-point for your program, equivalent to Java's <clinit>.
Event Value
Type
Description
name
The name of the loaded script.
path
The full path of the loaded script in skript/path/script format.
Copy link
Contents
Any Load
Load