Create Sequence Element Icon Create Sequence

With this action you can create a sequence element of any sequence from the Asset Browser. You give the name of the sequence and an x/y position within the room where it is to be created as well as the layer that it is to be created on (this layer must be an asset layer). You can tick the "relative" flags to position the sequence relative to the instance running the action code blocks. Whenever you create a sequence in the game in this way, it is given a unique element ID value with which you can then identify the sequence in further actions, therefore this action permits you to define a "target" variable to hold this ID value (as shown in the example below). Note that the target can be flagged as a temporary (local) variable, which will be created for the action and can be used in all subsequent actions for the event the action is in.

 

Action Syntax:

Create Sequence Element Action

Arguments:

ArgumentDescription
SequenceThe name of the sequence to create an element of.
xThe x position in the room to create the sequence (can be relative to the calling instance).
yThe y position in the room to create the sequence (can be relative to the calling instance).
layerThe name (a string) of the asset layer to create the sequence on.
TargetThe variable to target for the return value.

 

Example:

Create Sequence Element ExampleThe above action block code creates a new sequence and stores its unique element ID value in a variable. This variable is then used to pause the sequence using the Pause Sequence action.