KayelGee / token-attacher

MIT License
11 stars 18 forks source link

The Mount Up macro provided as an example in Token Attacher works, but when the mount moves it throws the mounted actor a few squares away #92

Open KayelGee opened 1 year ago

KayelGee commented 1 year ago

From Discord: The Mount Up macro provided as an example in Token Attacher works, but when the mount moves it throws the mounted actor a few squares away... Have you encountered this before?

Complete refresh and removed all attacher data from the scene Works as I want it on GM clicking mount, throws the token if the player clicks mount Always throws the token backwards after a player clicks mount - if the player moves the wolf right the player token goes to the left etc

It goes further If I mount up on the GM account, then the player issues move commands, the token isn't thrown It's only thrown when the player mounts up then issues move commands

Wombees commented 4 weeks ago

I'm having this issue but it doesn't seem specific to the Mount Up macro.

When a macro first moves a token closer to the one it should attach to (the "mount"), the initial move looks fine but after the attachment they maintain an offset of the original distance between the token and the "mount". I've attached some gifs to demonstrate.

When the tokens start off closer together: Shorter_Distance

When the tokens start off further away: Longer_Distance

The specific macro I'm using is for attaching 2 specific tokens to each other:

(async () => { let zym = canvas.scene.tokens.getName('Zym'); let mlemily = canvas.scene.tokens.getName('Mlemily'); ui.chat.processMessage('Come here, ${mlemily.name}!', {speaker:ChatMessage.getSpeaker({actor: zym.actor})}); await new Sequence() .animation() .on(mlemily) .moveTowards(zym) .duration(500) .play() await tokenAttacher.attachElementToToken(mlemily, zym._id, true); })();