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

Macro's and if statements.

So i am wondering if i can get if statements or something of its equivilient to work in roll 20's macro system. An example would be if 2d6=5 then display 6 missle hit or something like for each dice result display a hit location like 2d6=2 then display headshot. I have not found any sort of thing that relates to me being able to do this.(and yes this is for battletech.)
1453172137

Edited 1453173092
Silvyre
Forum Champion
You could easily create macros using simple conditional logic as you've shown in your example with the assistance of an API Script (my recommendation is PowerCards ). Access to the API is available within games in which the Creator has an active Pro subscription. Otherwise, you might be able to make do with Rollable Tables , each Table emulating certain roll. Your example would use a Rollable Table with 11 Items (representing outcomes of 2 to 12), with each Item weighted as described here .
Is there a way to copy rollable tables that others have made, or does each user have to generate theirs from scratch?
1453186917
Silvyre
Forum Champion
There are API Scripts to import/export Rollable Tables, e.g. TableExport .
Silvyre said: There are API Scripts to import/export Rollable Tables, e.g. TableExport . You're very helpful, Silvyre! Thanks for your contributions to this community being an awesome one :)