PauseAPI
Generic typesno constructorsource
Control the pause API
Fields
ignore_screen
Bitmask for game SCREEN where the PRE_✱ pause types are ignored, even though enabled in pause. Can also use the special cases [FADE, EXIT] to unfreeze temporarily during fades (or other screen transitions where player input is probably impossible) or the level exit walk of shame.
last_instance
boolean
Set to true to run pause logic and triggers only in the last API instance in the chain (Playlunky) when multiple instances of the API (Overlunky and Playlunky) are injected.
sourcelast_trigger_frame
integer
Global frame stamp when one of the triggers was last triggered, used to prevent running them again on the same frame on unpause.
sourcemodifiers_clear_input
boolean
Enable to clear affected input when modifiers are held, disable to ignore all input events, i.e. keep held button state as it was before pressing the modifier key
sourcepause
PAUSE_TYPEproperty
Current pause state bitmask. Use custom PAUSE_TYPE.PRE_✱ (or multiple) to freeze the game at the specified callbacks automatically. Checked after the matching ON update callbacks, so can be set on the same callback you want to block at the latest. Vanilla PAUSE flags will be forwarded to state.pause, but use of vanilla PAUSE flags is discouraged and might not work with other PauseAPI features.
sourcepause_screen
Bitmask to only enable PAUSE_TRIGGER.SCREEN during specific SCREEN, or any screen when NONE.
sourcepause_trigger
Bitmask for conditions when the current pause_type should be automatically enabled in pause, can have multiple conditions.
skip
boolean
Set to true to unfreeze the game for one update cycle. Sets back to false after ON.POST_GAME_LOOP, so it can be used to check if current frame is a frame advance frame.
sourceskip_fade
boolean
Set to true to skip all fade transitions, forcing fade_timer and fade_value to 0 on every update.
sourceunpause_screen
Bitmask to only enable PAUSE_TRIGGER.SCREEN during specific SCREEN, or any screen when NONE.
sourceunpause_trigger
Bitmask for conditions when the current pause_type should be automatically disabled in pause, can have multiple conditions.
update_camera
boolean
Set to true to enable normal camera movement when the game is paused or frozen on a callback by PauseAPI.
sourceMethods
set_paused
function PauseAPI:set_paused(enable: boolean): booleanenable:boolean
Returns boolean