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

Changing the text of a macro button.

Is there a way of changing the text of a macro button to reflect a toggle state? I am designing my power attack script, and decided that it should be either on or off. I want the button to reflect the state of the operation. It's initial state is off, so the button reads Power Attack: Off, when clicked I want to change it to Power Attack: On. I am still working on the logistics of the script, but I wanted to know if this is possible before I start amusing that it is.
1404323470

Edited 1404323630
Reflecting on this issue, I realize that I can use status markers. Now... is it possible to add custom makers? While I really like the markers they presently have, I think for power attack a single sword with a streak or 2 (making it look more like a swift strike now that I think about it) is what I would like to use.
1404324518
The Aaron
Roll20 Production Team
API Scripter
To answer your first question, macro names can be changed. You just need to get the object and .set('name',"Power Attach: On") it. <a href="https://wiki.roll20.net/API:Objects#Macro" rel="nofollow">https://wiki.roll20.net/API:Objects#Macro</a> For your second question, no, you can't use custom status markers. There is a suggestion in the mentors forum talking about being able to customize this, or at least choose from a subset of status markers.