fantasycalendar / FoundryVTT-Sequencer

This module implements a basic pipeline that can be used for managing the flow of a set of functions, effects, sounds, and macros.
Other
41 stars 17 forks source link

Token transformation not affecting image art on hover #212

Closed Pentazer closed 7 months ago

Pentazer commented 7 months ago

Describe the bug I have managed to get the token transformation effect working from here: https://fantasycomputer.works/FoundryVTT-Sequencer/#/tutorials/basic-transformation

However it's only affecting the token, it's not also changing the image art to the new profile image for the transformed state. This doesn't seem to be working though.

To Reproduce Execute macro on token

Expected behavior Change the token on board AND the image art.

Setup:

Additional context Here is the macro. I've changed the transform to have both A and B, one for the let notTransformedA = "worlds/xcyber/Characters/Tokens/CHARA-Token.png"; //Token let notTransformedB = "worlds/xcyber/Characters/CHARA.jpg"; //Profile

let transformedA = "worlds/xcyber/Characters/Tokens/CHARA-ARMOUR-Token.png"; //Token let transformedB = "worlds/xcyber/Characters/CHARA-ARMOUR.jpg"; //Profile

let imgA = token.document.texture.src === notTransformedA ? transformed : notTransformedA; let imgB = token.document.thumbnail === notTransformedB ? transformed : notTransformedB;

new Sequence() .sound() .file("Master Archive/SFX/FFVI/MachineRayShort.wav") .fadeInAudio(0) .fadeOutAudio(0) .waitUntilFinished(-1500) .thenDo(() => { .token.document.update({ "texture.src": imgA }); .token.document.update({ "thumbnail": imgB }); }) .play()

Haxxer commented 7 months ago

This is not a bug, but a limitation of the macro you have provided. I do not offer macro support in tickets, as it is not a bug. Ask in the foundry discord's macro channel for help instead.

Pentazer commented 7 months ago

Okay, thanks!