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

Single roll, multiple results ?

1491049933

Edited 1491050105
I'm trying to make a macro that rolls once and then uses that roll for different, separate operations. In order, I need the macro to do this: 1) Roll the die 2) Store the result somewhere in temporary memory/variable/array/whatever 3) "Call" that result back, as many times as I want, inside the same macro, to do different things Is this possible? If no, are there workarounds?
1491050812
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Unfortunately, it's not possible without an API script (pro perk) like SkyCaptain's Powercards. I can see a sort of workaround using command buttons. On my phone atm, but I'll post back later with a basic idea from my computer.
Not really... not without writing an API script for that purpose. Which requires a Pro subscription.
Scott C. said: Unfortunately, it's not possible without an API script (pro perk) like SkyCaptain's Powercards. I can see a sort of workaround using command buttons. On my phone atm, but I'll post back later with a basic idea from my computer. Even with PowerCards, there are limitations on what can be done with them. Someday I may re-write powercards to take advantage of of the async/await changes to the api, but I don't know when, if ever, I will get around to that.
Seppo o. said: Is this possible? If no, are there workarounds? The obvious one to me is to Roll the die; then if it;s a one pull from Table 1 as many times as you need [or run Macro 1]?  If it is a 2 then do the same with Table/Macro 2 - but I guess you wanted to automate it more than this
1491080796
Andrew C
Marketplace Creator
If you are just randomly deciding between things you may be able to have a table do the work. one table has the names of other tables as results. you may be able to then roll for instance [[1d6]]t[1t[TableChooser] ] (syntax may be wrong).
1491161283
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Andrew (Halfling Gypsy) said: If you are just randomly deciding between things you may be able to have a table do the work. one table has the names of other tables as results. you may be able to then roll for instance [[1d6]]t[1t[TableChooser] ] (syntax may be wrong). Won't work due to how table rolls are resolved