The Track Struct

The track struct can be used either for top-level asset tracks or for sub-track parameter tracks, and the behaviour of the track is defined by two things, its name and its type. Track structs are created using the function sequence_track_new and can be retrieved from sequence assets using the activeTracks property of The Sequence Instance Struct or the tracks property of The Sequence Object Struct.

The properties available in the track struct are:

Sequence Track Struct
Variable Type Description
type Sequence Track Type Constant This contains a Sequence Track Type Constant that describes the type of track. This can be any one of the constants given under the Type section.
name String When creating a "top-level" asset track, the name you give here can be any string that you require to identify the track. However, for parameter tracks, you need to specify specific strings to tell GameMaker what kind of parameter track you are creating. This is expanded upon under the Name section below.
tracks Array of Sequence Track Structs This property allows access to the list of tracks which are children of this track. When getting this property an array of Sequence Track Structs is returned, and when setting this property an array of Sequence Track Structs should be specified.
visible Boolean This indicates whether this track is visible (the value is true) or not (the value is false). You can get or set this value and if a track not visible then none of its child tracks will be drawn either.
keyframes Array of Sequence Keyframe Structs This property allows access to the list of keyframe structs for the track. When getting this property an array of keyframe structs is returned, and when setting this property an array of keyframe structs should be specified.
enabled Boolean This indicates whether this track is enabled. If the track is an asset track it isn't drawn when disabled, if it's a parameter track the track's values aren't applied.

 

Type

The type property can be any one of the following constants (these constants are also used when generating keyframes and keyframe data):

Sequence Track Type Constant
Constant Description Value
seqtracktype_graphic This is a graphics (sprite) asset track. 1
seqtracktype_audio This is an audio asset track. 2
seqtracktype_instance This is an instance asset track. 14
seqtracktype_sequence This is a sequence asset track. 7
seqtracktype_clipmask This is a clip mask group asset track. 8
seqtracktype_clipmask_mask This is a clip mask sprite asset track used for generating the clip mask. 9
seqtracktype_clipmask_subject This is a clip mask sprite asset track that is being masked. 10
seqtracktype_group This is a group folder asset track. 11
seqtracktype_colour This is a colour data parameter track. 4
seqtracktype_real This is a real number parameter track. 3
seqtracktype_message This is a broadcast message track. 15
seqtracktype_moment This is an event/moment track. 16
seqtracktype_text This is a text asset track. 17
seqtracktype_particlesystem This is a particle system asset track. 18
seqtracktype_bool Not used currently. 5
seqtracktype_string Not used currently. 6
seqtracktype_spriteframes Not used currently. 13
seqtracktype_empty Not used currently. 12
seqtracktype_audioeffect This is an audio effect parameter track. 19

Name

The name property can be any of the following strings:

Text Track parameter names (only used under Text tracks)

Audio Effect Track parameter names

Interpolation

The interpolation property can take one of the following constants: 

Sequence Track Interpolation Constant
Constant Description Value
seqinterpolation_assign Don't use interpolation for this track 0
seqinterpolation_lerp Use linear interpolation for this track 1