Sequencers
Sequencers are objects that remotely activate a configured sequence of other client objects.
Use Cases
Sequencers are used as the replacement for Pushbox contraptions that were widely used in older kits, and have several benefits such as them being much more consistent due to not being prone to physics issues.
Using Sequencers
Objects activated by Sequencers must be placed in the Sequencer's Sequence folder. When activated by any part in the Activators folder, the Sequencer will begin moving in the direction it is facing. Objects in the sequence will be activated when the Sequencer passes through the center point of the object.
The center point of an object is defined by the position of its Pivot. If the object is a Model, it is recommended to set the model's PrimaryPart to its activator part to properly position the Pivot at the activator's location. Otherwise, you should use the pivot editor to reset the pivot back to its default location (the center of the part). Not doing this may cause the object to not be activated at the proper time during the sequence.
When placing these objects in the Sequence folder, please make sure to do the following (if applicable):
- Set
CanCollide&CanTouchtofalseon all objects. - Disable all TouchConfigurations. This is to make sure they can't be affected by objects outside of the sequence, and to help reduce lag.
If a reached object has a YieldSequence tag, the Sequencer will pause until that object's function finishes running. In the case of button platforms, it will pause until the button platform activates.
If a part named EndPoint is reached in the sequence, the Sequencer will prematurely end. This can be used for debugging purposes.
For performance reasons, Sequencers will not run when the game is running below 10FPS. A warning message will also be displayed if the Sequencer is looping at an obscene rate (25+ times per second)
It is heavily recommended to label what each object in a Sequencer is doing using signs, this will help you in debugging your sequence and help us in bugfixing your tower.
Stopping Sequencers
A sequence can be ended/cancelled prematurely by touching any part in the Stoppers folder. Stopper parts have a special StopperConfiguration object inside of them containing attributes that behave as follows:
| Name | Default Value | Description |
|---|---|---|
BreakLoop | true | If enabled, the loop the sequencer is in (configured using LoopAmount) will be cancelled entirely. Otherwise, the sequence will go back to the start of the loop and keep running. |
Sequence Groups
A SequenceGroup template can be found in the Extra Sequencer Stuff folder in the kit. If you parent objects into this group, they will have special behavior based on the GroupConfiguration's Mode when activated in a sequence:
Randomwill simply select and activate a random object from the group.AndandOrare conditional modes that rely on Property Checkers. The Sequencer will activate all Property Checkers in the group and cancel the sequence if their conditions are not met. If usingAnd, all conditions have to be met, and if usingOr, only one condition has to be met.
Sequence Pointers
Sequence Pointers can also be found in the Extra Sequencer Stuff folder. When activated in a sequence, the Sequencer will search for any objects with Tags matching its Pointer attribute, and activate those objects. For example, if you have a client object with the tag RemoteObject and add a Sequence Pointer set to the value RemoteObject to the sequence, that object will get activated when the Sequencer passes through the pointer object.
Sequence Variables are also supported, by making the sequence pointer's Pointer attribute a sequence variable wrapped around in curly braces. An example can be found in that section of this page.
Sequence Variables
Every Activator part has a SequenceVariables Configuration object. Any attributes you add to this object can be read by Property Changers.
Using Sequence Pointers, they can be used to have a Sequencer perform different behavior based on which Activator you touch. For example, if you have a client object with the tag RemoteObject, the Activator's SequenceVariables has an attribute named ObjectToActivate with the value RemoteObject, and the Sequence Pointer has the pointer configuration set to {ObjectToActivate}, it will activate the client object that has that RemoteObject tag.
Sequencer Support
The following objects are currently supported by Sequencers:
| Object | Notes |
|---|---|
| Attachers | |
| Balloons | |
| Boosters | |
| Boost Removers | |
| Buttons | |
| Button Deactivators | |
| Damage Bricks | Damage bricks passed in a sequencer will damage the player |
| Dialog System | If used with Sequence Pointers, seperate tags must be applied to each individual DialogPart. Otherwise, you must have an entire Dialog System folder in the Sequence for it to function correctly. |
| Dismounters | |
| Emitters | |
| GUI Displayers | |
| Lighting Changers | |
| Morphers | If used with Sequence Pointers, seperate tags must be applied to each individual Button model. Otherwise, you must have an entire Morpher Group folder in the Sequence for it to function correctly. |
| Music Zone Editors | |
| Property Changers | |
| Pushbox Spawners | |
| Pushbox Destroyers | |
| Seats | |
| Sequencers | Recommended to use with Sequence Pointers. If directly nested inside another sequencer, set the model's PrimaryPart to the Base part. |
| Swings | |
| Teleporters | Seamless mode will not function correctly. |
| Trip Parts | |
| Turrets | |
| Vanishers | |
| Vines | |
| Ziplines |
For any object that should be used, interacted with or seen by the player (mountables, Emitters, etc), it is recommended to use Sequence Pointers instead of having the object parented to the Sequencer.
Music Sync
Sequencers can be synced to the tower's music. This will adjust the speed of the Sequencer to match the BPM of the currently playing song (1 stud per beat). See the documentation on music sync for more information. Note that music-synced sequencers will continue moving forward until the end of the song and do not support looping.
Configuration
| Name | Default Value | Description |
|---|---|---|
Cooldown | 0 | The amount of time it will take for the Sequencer to be usable again after it finishes. |
HideSequence | false | When true, and Visualize is false, the Sequence folder will be parented elsewhere and fully hidden from view. Note that when enabled, any Property Changers in the sequence may not work if instances are not accessed via Tags. |
LoopAmount | 0 | The amount of times the Sequencer will run when activated. If set to 0, it will only run once. If set to any negative number, it will keep running forever. |
LoopDelay | 0 | The amount of time the Sequencer will wait before reactivating after every loop. |
RunAtStart | false | When true, the Sequencer will automatically run when the tower is entered, without it having to be activated by touch. |
Speed | 1 | The speed the Sequencer will move at, in studs per second. |
Visualize | true | When true, the Sequencer will move to show its progress, and color itself to show its current state. Useful for debugging sequences. |