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

[Question] Can a button trigger a roll and a sheetworker?

1528049974
Darren
Pro
Sheet Author
API Scripter
I can make a <button type="roll"> and it will roll dice and spit out the results to the chat box. I can make a <input type="checkbox"> and use css to make it look just like a button, and it will run a sheetworker. Is there a mechanism that will do both?  I want a button that rolls dice and spits out the results to the chat box AND triggers a sheetworker.  An attack rolls dice, damage, and hit location, but also costs the character points which must be subtracted from the character's END attribute. Is there a sheetworker event that will trigger when a button is pressed? Is there a way for a sheetworker to trigger a button?
1528050967

Edited 1528050982
vÍnce
Pro
Sheet Author
Darren said: Is there a sheetworker event that will trigger when a button is pressed? Is there a way for a sheetworker to trigger a button? I don't think so. <a href="https://app.roll20.net/forum/permalink/5389163/" rel="nofollow">https://app.roll20.net/forum/permalink/5389163/</a> I think what you would need to use something like the Ammo script or similar that can listen for events and then manipulate attribute values.&nbsp;&nbsp;