Code: Select all
[h : updates = json.set("", "Name", "XXX", "useDistance", 1, "x", getTokenX(1,selectedToken), "y", getTokenY(1,selectedToken), "facing", getTokenFacing(selectedToken))]
[h: copyToken("Mines", 1, "Resources", updates)]
1. It does not return the id or name of the created token and I need to do further work on the token that I can't via the "updates" json. Is there some way to determine the id/name of the token created so that I can access it to set further properties?
2. This works just fine when the "selectedToken" is the same size as the token that I'm copying (in this case, the "Mines" token from the "Resources" map). The new token is created directly under the selected Token. But, if they're not the same size, the things are "off". I know they would be off if the sizes were totally different but my selected token is 75x150 and the "Mines" token is 75x75. I expected the created token to be directly under the front half of the selected token. But its off by like 15 pixels. Any ideas on why this would be? I've double checked the sizes and they are sized as stated.
Thanks!