layer_sequence_get_sequence

With this function you supply the sequence element ID - as returned by layer_sequence_create() or by one of the layer element functions - and it will return the sequence object struct. This function bypasses the need to first get the sequence instance struct and permits you to access the sequence data directly. You can find out more about the format of the sequence object struct on this page.

 

Syntax:

layer_sequence_get_sequence(sequence_element_id)

ArgumentType Description
sequence_element_idSequence Element ID The unique ID value of the sequence element to target

 

Returns:

Sequence Object Struct

 

Example:

var _seq = layer_sequence_create("Background", 0, 0, seq_AnimatedBackground);
var _struct = layer_sequence_get_sequence(_seq);
_struct.playbackSpeedType = spritespeed_framespersecond;
_struct.playbackSpeed = 30;

The above code creates a new sequence element and then retrieves its sequence data struct. This is then used to change the playback speed and type of the sequence.