getMoveCount: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
|trusted=true
|trusted=true
| description=
| description=
{{stub}}
Returns the token's last movement count in units.  The count takes movement metric into account, and thus works on gridless, hex, and square grids.  Two optional parameters allow you to set Fraction Only or Use Terrain Modifiers for determining returned movement count.
Returns the token's last movement count in units.  The count takes movement metric into account, and thus works on gridless, hex, and square grids.


| usage=
| usage=
<source lang="mtmacro">
<source lang="mtmacro">
getMoveCount()
getMoveCount()
getMoveCount(fractionOnly)
getMoveCount(fractionOnly,useTerrainMods)
</source>
</source>
'''Parameters'''
{{param|fractionOnly|0 for normal count; 1 for fractional count - only applies with 1-2-1 movement metric}}
{{param|useTerrainMods|0 to ignore terrain modifiers; 1 to account for terrain modifiers}}
|changes=
* '''1.5.0''' - Added Fraction Only and Use Terrain Modifiers parameters.
}}
}}


[[Category:Miscellaneous Function]]
[[Category:Miscellaneous Function]]

Revision as of 04:17, 24 July 2019

getMoveCount() Function

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

Introduced in version 1.3b76
Returns the token's last movement count in units. The count takes movement metric into account, and thus works on gridless, hex, and square grids. Two optional parameters allow you to set Fraction Only or Use Terrain Modifiers for determining returned movement count.

Usage

getMoveCount()
getMoveCount(fractionOnly)
getMoveCount(fractionOnly,useTerrainMods)

Parameters

  • fractionOnly - 0 for normal count; 1 for fractional count - only applies with 1-2-1 movement metric
  • useTerrainMods - 0 to ignore terrain modifiers; 1 to account for terrain modifiers


Version Changes

  • 1.5.0 - Added Fraction Only and Use Terrain Modifiers parameters.