Snap to Grid Macro?

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
Tyshalle
Giant
Posts: 173
Joined: Sat Jul 10, 2010 5:45 pm

Snap to Grid Macro?

Post by Tyshalle »

I was hoping to add a simple line of code to a macro that would automatically turn the token's snap to grid off. I've looked up and down the wiki and searched the forums and can't find anything on it. Most I can find is isSnapToGrid, which only lets you know if a token is set to snap to grid or not, but I can't find a function that will actually turn it on or off.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Snap to Grid Macro?

Post by aliasmask »

Afaik, there is no macro for that.

Tyshalle
Giant
Posts: 173
Joined: Sat Jul 10, 2010 5:45 pm

Re: Snap to Grid Macro?

Post by Tyshalle »

darn. Seems like such a simple/obvious one. I know it's easy enough to just right click the token and change it that way, but still.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Snap to Grid Macro?

Post by Jagged »

I believe D4rkAlf added setTokenSnapToGrid() to 1.4. Pretty sure I tested it too.

We have been bad at updating the Wiki. I am as guilty or worse than anyone about that :(

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Snap to Grid Macro?

Post by aliasmask »

Jagged wrote:I believe D4rkAlf added setTokenSnapToGrid() to 1.4. Pretty sure I tested it too.

We have been bad at updating the Wiki. I am as guilty or worse than anyone about that :(
I tried:

Code: Select all

[setTokenSnapToGrid(0)]
which did not work.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Snap to Grid Macro?

Post by Jagged »

Hmmm. I am wondering if that was a function where he decided to use "true" and "false" instead of 1 and 0 and was therefore rejected?

I will check tonight or tomorrow.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Snap to Grid Macro?

Post by aliasmask »

Is there place in the java code or some procedure to run to show all the available functions for MT? I know there are a couple of functions not in the wiki and others that may not have all the listed possible parameters.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Snap to Grid Macro?

Post by Jagged »

I don't think there is an easy way to get a list.

All the functions are defined with the classes within the "\net\rptools\maptool\client\functions" directory. But there are 50+ classes and each defines a small set of functions. these are also, only script functions. Roll functions are elsewhere.

Post Reply

Return to “Macros”