Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] Toggle status markers and attribute

1457038951

Edited 1458248168
James W.
Sheet Author
API Scripter
Here's a script I cooked up to toggle an arbitrary status marker, and set an attribute to either 0 or 1 to match.  I use this for several abilities my players have, such as Smite Evil and Power Attack.  The status marker visually indicates that the ability is turned on, and I can use the attribute to toggle the bonuses in macros by multiplying by it.  I put the API command in token actions so that my players have a simple button to turn their abilities on and off. You can find the names of the status markers at the bottom of the Graphics section of the API Objects wiki page . Usage: !toggle-status <name of status marker>|<name of attribute> Example: !toggle-status all-for-one|smite
1457039335
The Aaron
Pro
API Scripter
Nice!
1458248584

Edited 1458577927
James W.
Sheet Author
API Scripter
Updated the script; refactored the code a bit, and added a call to my TokenSync script, to synchronize the status markers (if you're also using TokenSync, and if you've set that character to synchronize the status markers).