foundryvtt / foundryvtt

Public issue tracking and documentation for Foundry Virtual Tabletop - software connecting RPG gamers in a shared multiplayer environment with an intuitive interface and powerful API.
https://foundryvtt.com/
192 stars 10 forks source link

Token movement paths with waypoints inside regions terminate movement if they are updated on entering the region #10789

Closed Fyorl closed 2 weeks ago

Fyorl commented 2 weeks ago

Originally reported by zhell9201 https://discord.com/channels/170995199584108546/1184176415139184731/1233830006845865984

Short Description of bug: A token movement path that has a waypoint inside a scene region will be terminated at that waypoint if the scene region has a 'Token Enters' event that performs an update to the token. E.g., setting the "texture.tint" property.

Simple steps to reproduce the bug: Make a scene region with an 'Execute Script' behavior with the event 'Token Enters' and this script:


const token = event.data.token;
return token.update({"texture.tint": "0x000000"});
```then create a path using the ruler on the token layer starting outside the region, where 1 waypoint is inside the region, and the next is outside. Execute the movement. The token stop as soon as it hits the first waypoint.