Toggle State: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Toggle State== This is a very simple macro that allows you to toggle the state of selected tokens. It is potentially useful to a GM who has players that can mark - simply set the name o...) |
m (Taustin moved page toggle State to Toggle State without leaving a redirect) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
Special thanks to zEal who made this macro for me. | Special thanks to zEal who made this macro for me. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: StateName = "Marked_red" ] | [h: StateName = "Marked_red" ] | ||
[h, foreach( Selected, getSelected("json") ): | [h, foreach( Selected, getSelected("json") ): | ||
Line 12: | Line 12: | ||
] | ] | ||
</ | </syntaxhighlight> | ||
[[Category:Cookbook]] | [[Category:Cookbook]] |
Latest revision as of 23:59, 3 May 2023
Toggle State
This is a very simple macro that allows you to toggle the state of selected tokens. It is potentially useful to a GM who has players that can mark - simply set the name of the state at the beginning of the macro. It is useful to have a different button (stored locally or in campaign macros) for each player's mark. You can quickly select several enemies when marking with a blast/burst power or for switching marks you can select both the old mark and the new mark and it will toggle as wanted.
Special thanks to zEal who made this macro for me.
[h: StateName = "Marked_red" ]
[h, foreach( Selected, getSelected("json") ):
setState(StateName,if(getState(StateName, Selected),0,1),Selected)
]