Reference ‐ Pausing - KormexGit/GM-Animate GitHub Wiki

There are two options for pausing animations: you can pause the global time source, will which pause the entire animation system, including animations started after the pause. Or, you can pause on an individual animation basis, with a function included to toggle pausing on all animations at once. Doing this would allow you to pause all currently active animations without pausing future ones, so you can do things like pause all gameplay animations without pausing menu animations that are started after the pause.

animation_set_global_pause

Pauses or unpauses the global time source used by GM Animate. This will stop all animations from updating in any way, including ones started after this function is called. If you instead want to pause only animations that already exist, use animation_set_pause_all.

animation_set_global_pause(_pause)
Argument Type Description
_pause Boolean Whether to pause (true) or unpause (false)

Returns: N/A (Undefined)

   

animation_get_global_pause

Returns whether the global time source is currently paused or not.

animation_get_global_pause()

Returns: N/A (Undefined)

   

animation_set_pause

Sets the pause state of an animation. You can also change the paused variable in the animation struct directly.

[!NOTE] Pausing is different from the hitstop effect. Pausing will pause everything, including effects, while hitstop only stops the animation itself and effects will continue to update.

animation_set_pause(_pause, _track = 0)
Argument Type Description
_pause Boolean Whether to pause (true) or unpause (false)
_track Real (Int) (Optional) The track to set pausing for. Pass all to pause all tracks at once

Returns: N/A (Undefined)

   

animation_get_pause

Returns if an animation track is currently paused or not.

animation_get_pause(_track = 0)
Argument Type Description
_track Real (Int) (Optional) The track to check. Pass all to check if every track is paused

Returns: N/A (Undefined)

   

animation_set_pause_all

Sets the pause state for every currently active animation in the game. This is not specific to the calling instance, it will set the pause state for every existing animation on a global scale. This is useful over animation_set_global_pause because it only pauses active animations, and animations started afterwards (such as menu animations) will still run.

animation_set_pause_all(_pause)
Argument Type Description
_pause Boolean Whether to pause (true) or unpause (false)

Returns: N/A (Undefined)