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

How to use the Charactermancer Action Button and on(clicked) ?

1530111630
GiGs
Pro
Sheet Author
API Scripter
The charactermancer update provides a new Action button that can be used in character sheets, which is intriguing. What sort of thing would this be used for? For reference, here's the available documentation. Introduced in the Charactermancer update are Action Buttons. These buttons can be listened for with the on "clicked" event listener. They are not limited to the Charactermancer and can be used on the Character Sheet as well . The button must be type "action" and the button's name must be prefixed with "act_" in order to be heard. It is used with the click event: clicked:<action button name> on("clicked:action_button", function(eventinfo) {...}); The clicked listener triggers when an Action Button is clicked. It passes along an argument containing the following properties: triggerName:"clicked:action_button" The name of the Action Button that was clicked
1530115236

Edited 1530115722
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, interesting. I missed that in the general rollout. One thing that comes to mind is replacing my pseudoButtons for generating repeating items in filtered repeating section (such as filtering spells per level, or attacks by range) so that I can get rid of those attributes. I could wish that you could trigger rolls with that, would allow some cool resource management when rolling :)
1530125737
GiGs
Pro
Sheet Author
API Scripter
I use a lot of attributes with 0 and 1 values, used as on/off switches. I'm wondering if it could be used for those, but you'd need to know the last state, and I don't see how to get that.  I'm also curious about whatever other uses it might have.