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 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 struct from the section on Sequence Functions.
layer_sequence_get_sequence(sequence_element_id)
| Argument | Description |
|---|---|
| sequence_element_id | The unique ID value of the sequence element to target |
struct
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 the sequence data struct. This is then used to set the playback speed and type for the sequence.