I'm trying to put together an API script that changes the side of a multi-sided token, depending on token movement. I have kludged together bits of this script to change token side, and this one
to determine angle of movement. I have an extremely rudimentary
understanding of Javascript, so most of this has been guesswork. So
far, the script works mostly as intended. However, every time the token
changes side it will deselect the token - forcing the GM/player to
re-select it before being able to move further. This is using the arrow
keys and grid snap movement. Is there any way I can either
automatically re-select the token after it has changed side, or bypass
the de-selecting behavior in the script itself? Before movement: Pressing arrow keys ↓ + →