getLastPath/movedOverToken Question

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

getLastPath/movedOverToken Question

Post by RPTroll »

Is there a bug in movedOverToken where it can't handle the output of getLastPath(0)?

I run this command on an impersonated token
[r:t=getLastPath(1)]<br>+[r:movedOverToken("Information",t)]+
and get this output


[{"x":384,"y":512},{"x":448,"y":512},{"x":512,"y":512},{"x":576,"y":512},{"x":640,"y":512},{"x":704,"y":512},{"x":768,"y":512},{"x":832,"y":512}]
+[{"x":512,"y":512}]+

I run it with a 0
[r:t=getLastPath(0)]<br>+[r:movedOverToken("Information",t)]+
and get this output
[{"x":6,"y":8},{"x":7,"y":8},{"x":8,"y":8},{"x":9,"y":8},{"x":10,"y":8},{"x":11,"y":8},{"x":12,"y":8},{"x":13,"y":8}]
+[]+

Thanks in advance,
Keith
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image


User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: getLastPath/movedOverToken Question

Post by aliasmask »

The output makes sense if movedOverToken only checks for pixels. But the description does mention grid coordinates. What are your map settings? Are you using gridless anywhere? Snap to grid?

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: getLastPath/movedOverToken Question

Post by RPTroll »

That makes sense now that I think about it since you're passing in a JSON array without the units designation. It wouldn't know which one to use.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

Post Reply

Return to “Macros”