Timelines

Timelines are a powerful mechanism for controlling events in your game, and are based on "moments", where a "moment" is simply a single game step. These timelines are generally created from the Resource Tree using the Timeline Editor in a similar way to an object, ie: you create a timeline, then in each moment that you require it to perform an action you add some code or a DnD™ icon for it to perform. Once created, you can then stop, start, and manipulate timelines through code. You can even modify individual moments by defining a script and adding it into the timeline dynamically from a controller object (for example), making this a very powerful and versatile tool when creating your games.

The following functions are for adding and manipulating Timelines from within your game:


The following variables are "built in" to all instances to make working with Timelines easier and give you control over:

Note that you can find further information on instance variables here: Instance Variables.


Back: GameMaker Studio 2 Language Reference
Next: Objects
© Copyright YoYo Games Ltd. 2018 All Rights Reserved