Snap to Grid Macro?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Snap to Grid Macro?
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.
Re: Snap to Grid Macro?
Afaik, there is no macro for that.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Snap to Grid Macro?
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.
Re: Snap to Grid Macro?
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
We have been bad at updating the Wiki. I am as guilty or worse than anyone about that
Re: Snap to Grid Macro?
I tried: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
Code: Select all
[setTokenSnapToGrid(0)]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Snap to Grid Macro?
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.
I will check tonight or tomorrow.
Re: Snap to Grid Macro?
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.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Snap to Grid Macro?
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.
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.