You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Sequences that are meant to play on a template fail to locate the correct coordinates. Most apparent using JB2A with a fireball animation targeting a newly created circle template, or a lightning bolt animation on a ray (line) template.
To Reproduce
Enable JB2A, Sequencer, and dependencies in the dnd5e system (v2.2.2 and foundry v11.305).
Run the below script for fireball and lightning bolt respectively.
Cast fireball and place the template. The beam fires off into the corner.
Cast lightning bolt and place the template. The animation does not play at all (see console for an error).
// quick and ugly script for a fireball animconsttok=canvas.scene.tokens.find(e=>e);Hooks.once("createMeasuredTemplate",tem=>{constbeam="jb2a.fireball.beam.orange";constexpl="jb2a.fireball.explosion.orange";constseq=newSequence();seq.effect().file(beam).atLocation(tok).stretchTo(tem).playbackRate(2).waitUntilFinished();seq.effect().file(expl).atLocation(tem);seq.play({remote: true});});
// and for lightning boltHooks.once("createMeasuredTemplate",asyncfunction(templateDoc){constfile="jb2a.lightning_bolt.narrow.blue";returnnewSequence().effect().file(file).atLocation(templateDoc).stretchTo(templateDoc).play();});
Expected behavior
Animations targeting the template objects.
Setup:
Foundry Version: 11.305
System Version: dnd5e 2.2.2
Sequencer Version: 3.1.2
Browser & version: Microsoft Edge, Version 114.0.1823.82 (Official build) (64-bit), but also local foundry install.
Active modules:
Sequencer
socketlib
jb2a patreon
Additional context
This issue did not appear in v10 to the best of my recollection.
Adding await new Promise(r => setTimeout(r, 50)) to the top of the above hooks seems to fix any issues from initial testing.
The text was updated successfully, but these errors were encountered:
Describe the bug
Sequences that are meant to play on a template fail to locate the correct coordinates. Most apparent using JB2A with a fireball animation targeting a newly created circle template, or a lightning bolt animation on a ray (line) template.
To Reproduce
Expected behavior
Animations targeting the template objects.
Setup:
Active modules:
Additional context
This issue did not appear in v10 to the best of my recollection.
Adding
await new Promise(r => setTimeout(r, 50))
to the top of the above hooks seems to fix any issues from initial testing.The text was updated successfully, but these errors were encountered: