tokens.moveCount: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page tokens.moveCount to Tokens.moveCount without leaving a redirect: Converting page title to first-letter uppercase) |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
==usage== | ==usage== | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
<!-- @onMultipleTokensMove --> | <!-- @onMultipleTokensMove --> | ||
<!-- cancel movement if more than one token was moved --> | <!-- cancel movement if more than one token was moved --> | ||
[h, if(tokens.moveCount>1): tokens.denyMove = 1] | [h, if(tokens.moveCount>1): tokens.denyMove = 1] | ||
</ | </syntaxhighlight> | ||
[[Category:Special Variable]] | [[Category:Special Variable]] | ||
[[Category:Macro Function]] |
Latest revision as of 23:59, 4 July 2023
tokens.moveCount
You can use this variable in onTokenMove
and onMultipleTokensMove
events to find out how many tokens were moved.
usage
<!-- @onMultipleTokensMove -->
<!-- cancel movement if more than one token was moved -->
[h, if(tokens.moveCount>1): tokens.denyMove = 1]