Comments (6)
Sorry, completely misread your comment - I'll take a look at the sample macros
from foundryvtt-sequencer.
Did you follow the instructions at the top of the macro?
// Requires the JB2A module - if you're using their free version, change the path to point to the right location
// Requires Advanced Macros and MidiQOL with Workflow -> Add macro to call on use
// Then add this macro's name to the bottom of the Misty Step spell in the "On Use Macro" field
from foundryvtt-sequencer.
I did, and since the first animation does play it seems like the paths to the webms are correct.
I have Jb2a free installed, but I am using other animations (from https://github.com/jackkerouac/animated-spell-effects-cartoon, also in the modules folder). That should not be a problem, right?
from foundryvtt-sequencer.
Ah, I know why this is happening, some changes happened that made these macros need a different implementation. I'll update the macros to better reflect what should be needed.
from foundryvtt-sequencer.
For now, this macro should be all that you need to have it fixed:
// Requires the JB2A module - if you're using their free version, change the path to point to the right location
// Requires Advanced Macros and MidiQOL with Workflow -> Add macro to call on use
// Then add this macro's name to the bottom of the Misty Step spell in the "On Use Macro" field
let error = false;
if(typeof args !== 'undefined' && args.length === 0){
error = `You can't run this macro from the hotbar! This is a callback macro. To use this, enable MidiQOL settings in "Workflow" -> "Add macro to call on use", then add this macro's name to the bottom of the Misty Step spell in the "On Use Macro" field.`;
}
if(!(game.modules.get("jb2a_patreon") || game.modules.get("JB2A_DnD5e"))){
error = `You need to have JB2A installed to run this macro!`;
}
if(!game.modules.get("advanced-macros")?.active){
let installed = game.modules.get("advanced-macros") && !game.modules.get("advanced-macros").active ? "enabled" : "installed";
error = `You need to have Advanced Macros ${installed} to run this macro!`;
}
if(!game.modules.get("midi-qol")?.active){
let installed = game.modules.get("midi-qol") && !game.modules.get("midi-qol").active ? "enabled" : "installed";
error = `You need to have MidiQOL ${installed} to run this macro!`;
}
if(error){
ui.notifications.error(error);
return;
}
const lastArg = args[args.length - 1];
let tactor;
if (lastArg.tokenId) tactor = canvas.tokens.get(lastArg.tokenId).actor;
else tactor = game.actors.get(lastArg.actorId);
const target = canvas.tokens.get(lastArg.tokenId) || token;
let range = MeasuredTemplate.create({
t: "circle",
user: game.user._id,
x: target.x + canvas.grid.size / 2,
y: target.y + canvas.grid.size / 2,
direction: 0,
distance: 30,
borderColor: "#FF0000",
flags: {
world: {
MistyStep: {
ActorId: tactor.id
}
}
}
});
range.then(result => {
let templateData = {
t: "circle",
user: game.user._id,
distance: 2.5,
direction: 45,
x: 0,
y: 0,
fillColor: game.user.color,
flags: {
world: {
MistyStep: {
ActorId: tactor.id
}
}
}
};
Hooks.once("createMeasuredTemplate", deleteTemplatesAndMove);
const doc = new MeasuredTemplateDocument(templateData, {parent: canvas.scene});
let template = new game.dnd5e.canvas.AbilityTemplate(doc);
template.actorSheet = tactor.sheet;
template.drawPreview();
async function deleteTemplatesAndMove(template) {
let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.world?.MistyStep?.ActorId === tactor.id);
removeTemplates = removeTemplates.map(template => template.id);
if(removeTemplates) await canvas.scene.deleteEmbeddedDocuments("MeasuredTemplate", removeTemplates);
console.log(template.position)
new Sequence()
.effect()
.baseFolder("modules/jb2a_patreon/Library/2nd_Level/Misty_Step")
.file("MistyStep_01_Regular_Blue_400x400.webm")
.atLocation(target)
.JB2A()
.scale(0.6)
.randomRotation()
.wait(750)
.thenDo(async () => {
await target.document.update({
x: template.data.x - (canvas.grid.size * 0.5),
y: template.data.y - (canvas.grid.size * 0.5),
hidden: true
}, { animate: false });
})
.effect()
.baseFolder("modules/jb2a_patreon/Library/2nd_Level/Misty_Step")
.file("MistyStep_02_Regular_Blue_400x400.webm")
.atLocation({ x: template.data.x, y: template.data.y })
.center()
.JB2A()
.scale(0.6)
.randomRotation()
.wait(1500)
.thenDo(async () => {
await target.document.update({
hidden: false
}, { animate: false });
})
.play();
};
});```
from foundryvtt-sequencer.
Works like a charm. Thanks!
from foundryvtt-sequencer.
Related Issues (20)
- [BUG] - PixiJS Depreciation Warning
- [BUG] - belowTiles seems to be broken
- Disappearing Tokens Post-TP HOT 2
- [BUG] - tint does not work with attachTo
- [BUG] - Ouija Board for Sequencer Don't work after 3.1.3
- [BUG] - bindVisibility does not work when attaching to MeasuredTemplates
- [BUG] - persistTokenPrototype and locally do not mix
- [MINOR BUG] - js console reporting sequencer using deprecated call in PixiJS HOT 2
- [BUG] - Sequencer database ignores given range measures on files with multiple ranges.
- [BUG] - Glow filter has square border
- [REQUEST] - .name() Categories and Grouping Animations in Sequencer Effect Manager
- When I use Spirit Gaurdian I get an error HOT 1
- [REQUEST] - Don't play sound effects from modules that are not installed
- Token transformation not affecting image art on hover HOT 2
- [BUG] Rotate Towards Offset seems to not be working?
- [REQUEST] - .elevation() opacity control
- [REQUEST] - Add way to remove sounds effects
- [BUG] - Sequencer is returning a recursive error when used with warpgate and animated automations HOT 1
- [REQUEST] - Being able to add Repeat Delay on a Persistent Aura or Effect!
- [BUG] - ScaleToObject incorrectly using token from RotateTowards instead of AtLocation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundryvtt-sequencer.