isSnapToGrid: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page IsSnapToGrid to isSnapToGrid: Converting page titles to lowercase)
No edit summary
Line 14: Line 14:
|usage=
|usage=


<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
isSnapToGrid()
isSnapToGrid()
isSnapToGrid(id)
isSnapToGrid(id)
isSnapToGrid(id, mapname)
isSnapToGrid(id, mapname)
</source>
</syntaxhighlight>


'''Parameter'''
'''Parameter'''
Line 27: Line 27:


|example=
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: snap=isSnapToGrid()]</source>
[h: snap=isSnapToGrid()]</syntaxhighlight>


|also=
|also=

Revision as of 20:13, 15 March 2023

isSnapToGrid() Function

Introduced in version 1.3b69
Returns true(1) if a Token is snapped to grid or false(0) if it is not.

Usage

isSnapToGrid()
isSnapToGrid(id)
isSnapToGrid(id, mapname)

Parameter

  • id - The token id of the token which has its snapToGrid status checked, defaults to the Current Token.

     Note: This parameter can only be used in a Trusted Macro

  • mapname - The name of the map to find the token. Defaults to the current map.

Example

[h: snap=isSnapToGrid()]

See Also


|changes=

  • 1.5.4 - Added mapname parameter option.