getMoveCount: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Needs examples still...) |
||
Line 5: | Line 5: | ||
|trusted=true | |trusted=true | ||
| description= | | description= | ||
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. Two optional parameters allow you to set the function to return Fraction Only and/or Use Terrain Modifiers for determining returned movement count. | ||
| usage= | | usage= | ||
Line 14: | Line 14: | ||
</source> | </source> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|fractionOnly|0 for normal count; 1 for fractional | {{param|fractionOnly|0 for normal count; 1 for fractional movement - only valid with 1-2-1 movement metric}} | ||
{{param|useTerrainMods|0 to ignore terrain modifiers; 1 to account for terrain modifiers}} | {{param|useTerrainMods|0 to ignore terrain modifiers when determining movement count; 1 to account for terrain modifiers}} | ||
'''Fraction Only''' - Return value will be a 0 when there was an even number of diagonal movements and 1 for an odd number. This should only be used with the ONE-TWO-ONE movement metric. | |||
|changes= | |changes= | ||
* '''1.5.0''' - Added Fraction Only and Use Terrain Modifiers parameters. | * '''1.5.0''' - Added Fraction Only and Use Terrain Modifiers parameters. |
Revision as of 15:10, 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 the function to return Fraction Only and/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 movement - only valid with 1-2-1 movement metricuseTerrainMods
- 0 to ignore terrain modifiers when determining movement count; 1 to account for terrain modifiers
Fraction Only - Return value will be a 0 when there was an even number of diagonal movements and 1 for an odd number. This should only be used with the ONE-TWO-ONE movement metric.
Version Changes
- 1.5.0 - Added Fraction Only and Use Terrain Modifiers parameters.