The Sequence Object Struct

A sequence object is the name given to the struct retrieved from the sequence asset as defined in the asset browser for your game. This struct will have the following properties that can be changed:

Constant Description Value
seqplay_oneshot The sequence will play once then stop when finished. 0
seqplay_loop The sequence will loop, with the playhead going back to the start when it reaches the end of the playback region. 1
seqplay_pingpong The sequence will loop, with the playhead reversing direction when it reaches the end of the playback region. 2

 

Constant Description Value
spritespeed_framespersecond Specifies that playbackSpeed should be interpreted as frames-per-second 0
spritespeed_framespergameframe Specifies that playbackSpeed should be interpreted as frames-per-game-frame. 1

 

Note that if you want to access the properties of a sequence that has been created in the asset browser, you must first call the function sequence_get() on the asset index to retrieve the sequence object struct. Also note that any changes made to this sequence struct will mean that all further instances of this sequence asset will also have thse changes, and they will be maintained as long as the game is running, even if you call the game_restart() function.