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

Call a roll from sheet workers

I'm trying to find away that when a player clicks on a button their character sheet, it goes to sheet workers, and then calls a roll afterwards if they have the available actions. Here's what I have. Is this something you can do, or is there another way to approach getting this result?  < button   type = "roll"   name  =  "act_ChargeBeta"   value = "" ></ button > < button   type = "roll"   name  =  "roll_ChargeBetaSuccess"   value = "&{template:default}{{Ritual Check=[[1d20 +@{RitualCastingTotal}]] vs SC[[19]] }} " ></ button > < button   type = "roll"   name  =  "roll_ChargeBetaFail"   value = "&{template:default}{{Failed= You don't have enough support actions }} " ></ button > name = "attr_SupportActions"   value = "3"   /> < script   type = "text/worker" > on("click:chargebeta",function() {      getAttrs ([ "SupportActions" ],  function  ( values ){          let   SupportActions  =  values . SupportActions ;          if ( SupportActions  > 1 ){              SupportActions  -= 2 ;              //call ChargeBetaSuccess;         } else {              //call ChargeBetaFailure         }          setAttrs ({              "SupportActions" :   SupportActions         });     }); } ); </ script >
1611029020
GiGs
Pro
Sheet Author
API Scripter
There's no way to do this with a single button press. Sheet workers can only update character sheet attributes. Roll Buttons can only print to chat. Action buttons can do one or the other, but not both together. The only way to do this is with an API script, which you can then launch from a roll button. But this isnt a good solution if you plan to share your sheet, because only pro subscribing DMs can use it.
Well, at least now I know I can stop trying to look up how to do this. When I get the rest of the sheet going, perhaps I can hide all the action buttons or disable them with checkboxes if the actions aren't available.
By the way, thank you for all of the support. I try to dig through all the content before I ask a question, but I've been amazed by how helpful the community is on here at assisting everyone