Skip to content
Adam Oresten edited this page Mar 6, 2022 · 63 revisions

Sequencer

Fantasy Computerworks Logo

A module made by Fantasy Computerworks.

Like what we've done? Buy us a coffee!

Buy Me a Coffee at ko-fi.com


Firebolt missing and then hitting

If you are new to the Sequencer, please read this guide:

Macro Tutorials

Sequencer Related Classes:

Sequencer Core Methods

Core Methods

New Sequence

You can start a new Sequence by simply calling:

new Sequence()

Any other methods you call on this will continue to work on the same sequence, like so:

new Sequence()
     .thenDo(function(){
          console.log("I'm in here.")
     })
     .thenDo(function(){
          console.log("But now, I'm in here!")
     })

For module developers, by putting your module name in the Sequence like this:

new Sequence("myModuleName")

Means that any errors will show up like this:

Sequencer module error example

This will help you and your module's users to get to the bottom of the issue.

Play

.play()

Returns Promise

Causes the Sequence to play through all of its sections. Returns a Promise which resolves when all sections have played.

Add Sequence

.addSequence(inSequence)

Adds the sections from a given Sequence to this Sequence. This is useful if you have sequences you wish to combine at runtime.

Then do

.thenDo(function(){
    //do Stuff
})

Creates a section that will run a function. Remember that if you want your function to be asynchronous, and you want it to properly wait, you'll want to make the function into an async function:

.thenDo(async function(){
    //do Stuff
})

Macro

.macro("MacroName") or .macro(macroReference)

Creates a section that will run a macro based on a name or a direct reference to a macro. If the macro is not found, Sequencer will complain. Loudly.

If you have Advanced Macros installed, you may also pass any number of parameters to the method that will then be passed through to the macro:

.macro("New Macro", true, "fire-bolt", token.id)

Wait

.wait(1000) or .wait(500, 1000)

Causes the sequence to wait after the last section for as many milliseconds as you pass to this method. If given a second number, a random wait time between the two given numbers will be generated.

.animation() or .animation(inToken) or .animation(inTile)

Creates an animation section. Until you call any of the core methods, you'll be working on the Animation section.

.effect() or .effect(inFile)

Creates an effect section. Until you call any of the core methods, you'll be working on the Effect section.

.sound() or .sound(inFile)

Creates a sound section. Until you call any of the core methods, you'll be working on the Sound section.

Clone this wiki locally