Closed p4535992 closed 3 years ago
The api doesn't have any assumptions about anything being a target or not. In fact there's no difference between a target from Array.from(getGame().user.targets)
and a token.
In the example macro I just used targets because that's how a user is able to select anything beside his own token. In your scripts you can actually do for example await window['tokenAttacher'].attachElementToToken(riderToken, mountToken, true);
no problem.
Also what you're suggesting for the api to accept an id instead of a token is actually how it works. You can either pass a token or it's id.
So if some code of yours doesn't work, show me which part doesn't and I can maybe clear up your misunderstanding.
Ty for the clarification. It must be some mistake on my side
I was updating my Mount UP module, but I noticed some strange behavior when using your macros here. It is almost certainly due to the fact that you expect a "UserTarget" element and I instead provide a "Token" for the second argument.
Before getting back to my code I wanted to know if on your side it was complicated to add the following methods to your api for accept the token element or simply accept the string id of the token