I'm passing this as the json Conditions into a getTokens call
{"area":{"offsets":[{"x":0,"y":1},{"x":0,"y":6}],"token":"150DA58A51314F15A1CBFE34835AC70B"},"visible":1,"npc":0,"pc":1}
So on a square map, this works. It returns any tokens in the 6 cells directly to the south of the specified token, that are visible and PCs.
This is called in different ways and seems to work to get any PC/Visible tokens to the North/West/East of the token, assuming the "offsets" are changed accordingly.
But if I call this on an Isometric map...it doesn't work. Even though I can see that there are valid, visible tokens in that area.
Any ideas?
getTokens method, with Area condition not working
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
Re: getTokens method, with Area condition not working
Actually...hmmm...it seems taht it does work, but just for the tokens directly next to the one referenced in in the Cond Json. But since that goes from an offset of 1 to an offset of 6, shouldn't that be ALL tokens in that area of 6 cells?
Re: getTokens method, with Area condition not working
The docs suggest that you have to specify every cell:
Wiki: getTokens()offsets - A JSON array of JSON objects that specify each individual cell that make up the area.
Re: getTokens method, with Area condition not working
Doh! That would explain it, let me re-write this to include all the cells in the range, in the condition...thanks!