"normal set screen"
"set screen with fade"
set_screen default 0 fade // fade is the name of the transition to use
"set screen with duration"
set_screen map 0 fade 2000 // Make transition last 2 seconds
"set screen with duration and delay"
set_screen default 0 fade 2000 4000 // Make transition last 2 seconds and have the new screen be delayed by 4 seconds
Note: Specifying the layer is necessary when using transitions.
Currently, there are two transitions available:
It is possible to define custom transitions by creating css classes for them. For example, here are the CSS classes for the current transitions:
New transitions can be created by copying those CSS classes (and changing the name like
slide-rightin them) and adding them to the game's CSS, editing the values to whatever is desired.
Transitions can also have an optional config to change their default duration and delay. In
config.yaml, for example:
If no config is provided, the default duration is 0.5s, and the default delay is 0 (the old and new screens effectively transition at the same time).
The order of priority for choosing the duration or delay is: what's passed in the script --> If none, use the default for that command provided in the config --> if none, use the global default