Package Description
Sequencer
This module implements a basic pipeline that can be used for managing the flow of a set of functions, effects, sounds, and macros.
It implements a fluid and very readable interface so that even common users can read exactly what the Sequencer will do.
Guides
Here's a guide how to create a Fire Bolt effect using the Sequencer and a few other modules:
https://github.com/fantasycalendar/FoundryVTT-Sequencer/wiki/MidiQOL-&-JB2A-Fire-Bolt
How to use
First you have to define a sequence:
let sequence = new Sequence();
Then, you can add functions and effects to it.
let sequence = new Sequence();
sequence.thenDo(async function(){
do_something();
});
sequence.wait(200);
sequence.thenDo(async function(){
do_something_else();
});
The Sequencer uses a method-chaining fluent interface, meaning you can continuously call functions on the sequence object, like so:
let sequence = new Sequence()
.thenDo(async function(){
do_something();
})
.wait(200)
.thenDo(async function(){
do_something_else();
});
To start the sequence off, you simply call .play()
on the sequence.
Advanced Examples
If you have Animated Spell Effects installed (https://foundryvtt.com/packages/animated-spell-effects), you can select two tokens and run this macro:
new Sequence()
.effect("modules/animated-spell-effects-cartoon/spell-effects/cartoon/water/acid_splash_CIRCLE_01.webm")
.atLocation(canvas.tokens.controlled[0])
.scale(0.3, 0.6)
.randomRotation()
.effect("modules/animated-spell-effects-cartoon/spell-effects/cartoon/water/acid_splash_CIRCLE_01.webm")
.atLocation(canvas.tokens.controlled[1])
.scale(0.3, 0.6)
.randomRotation()
.play();
You can read more about the module on the github page, which also contain more examples!
Tagged Categories
Available Versions
-
Version 2.1.7