A downloadable library

Download NowName your own price

GM-FunctionQueue is a GameMaker data structure for calling code in a sequence. It can be used as a core for many systems, including cutscenes, turn-based combat, command patterns, items/abilities, and animations.

The update() method will call the current function in the queue.

  • If this call returns true or undefined (no return), it will immediately call the next function.
  • If the call returns false the queue will call that function again the next time update() is called. This allows the queue to wait until certain conditions are met.

The FunctionQueue can be attached to any scope, store functions for future use, clear functions when no longer needed, traversed freely, skipped, reset, or interrupted. Any of this can even happen from within the queue itself, though you should be careful of causing infinite loops.

Source code and documentation on GitHub.

Submission to the GameMaker Kitchen Cookbook Jam.

Download

Download NowName your own price

Click download now to get access to the following files:

GM-FunctionQueue-v1.0.0.yymps 5.8 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.