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
47 stars 25 forks source link

[BUG] - `.opacity()` on new sequence stops existing sequence until a token is moved #167

Closed InnilToo closed 1 year ago

InnilToo commented 1 year ago

Describe the bug When there is an existing sequence like:

await new Sequence()
  .effect()
  .attachTo(token)
  .file(file)
  .persist()
  .play({ remote: true });

And new sequence is played, for example a Misty Step to teleport a token:

await new Sequence()
  .effect()
  .file(vanish)
  .atLocation(token)
  .randomRotation()
  .scaleToObject(2)
  .wait(750)
  .animation()
  .on(token)
  .opacity(0.0)
  .waitUntilFinished()
  .play({ remote: false });

await token.document.update(
  { x: x - canvas.grid.size / 2, y: y - canvas.grid.size / 2 },
  { animate: false }
);

await new Sequence()
  .effect()
  .file(appear)
  .atLocation(token)
  .randomRotation()
  .scaleToObject(2)
  .wait(1500)
  .animation()
  .on(token)
  .opacity(1.0)
  .play({ remote: false });

The .opacity(0.0) makes the existing animation disappear. It will reappear if the token is moved. If I go to the Sequencer Layer I can see a white box on hover where the effect should be.

To Reproduce Steps to reproduce the behavior:

  1. Run any animation on a token that persists.
  2. Run a script that teleports the token with a sequence that contains .opacity().
  3. Animation disappears.
  4. Move a token to see the original animation.

Expected behavior It's okay for the original animation that was attached to the token to disappear during the transition but it should pop back once the other sequence is either over or the opacity is back to normal.

Setup:

Active modules:

Additional context Tried on a completely fresh world with the modules' default settings (except Item Macro hook).

Haxxer commented 1 year ago

Fixed in 3.0.6