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 from The Sequence Instance Struct or the tracks property from The Sequence Object Struct.

The properties available in the track struct are:

Sequence Track Struct
VariableTypeDescription
typeSequence Track Type ConstantThis contains a Sequence Track Type Constant that describes the type of track this is. This can be any one of the constants given under the "Type" section below.
nameStringWhen 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.
tracksArray of Sequence Track StructsThis 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.
visibleBooleanThis 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.
keyframesArray of Sequence Keyframe StructsThis 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.

 

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
ConstantDescriptionValue
seqtracktype_graphicThis is a graphics (sprite) asset track.1
seqtracktype_audioThis is an audio asset track.2
seqtracktype_instanceThis is an instance asset track.14
seqtracktype_sequenceThis is a sequence asset track.7
seqtracktype_clipmaskThis is a clip mask group asset track.8
seqtracktype_clipmask_maskThis is a clip mask sprite asset track used for generating the clip mask.9
seqtracktype_clipmask_subjectThis is a clip mask sprite asset track that is being masked.10
seqtracktype_groupThis is a group folder asset track.11
seqtracktype_colourThis is a colour data parameter track.4
seqtracktype_realThis is a real number parameter track.3
seqtracktype_messageThis is a broadcast message track.15
seqtracktype_momentThis is an event/moment track.16
seqtracktype_textThis is a text track.17
seqtracktype_particlesystemThis is a particle system track.18
seqtracktype_boolNot used currently.5
seqtracktype_stringNot used currently.6
seqtracktype_spriteframesNot used currently.13
seqtracktype_emptyNot used currently.12
seqtracktype_audioeffectThis is an audio effect 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
ConstantDescriptionValue
seqinterpolation_assignDon't use interpolation for this track0
seqinterpolation_lerpUse linear interpolation for this track1