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 .
×

If statement

Is there an if statement? I'm wondering if there is a function in the macros that works like aan if statement. Ie If roll >this then do this, otherwise do this. ?
1588301576
The Aaron
Roll20 Production Team
API Scripter
Nope.  Your options for If checks are custom Roll Templates (Pro subscription to edit, limited capabilities) or API Scripts (Pro subscriber perk).
Thanks I'll try a work around.
1588322624
Ziechael
Forum Champion
Sheet Author
API Scripter
There are ways of doing very basic if/then without roll templates or the API... what is your exact usecase?
wanted to create something that calculates if something hits. so that, if (to hit roll) is >= (target ac) then roll damage. else say it missed.
1589020399
Ziechael
Forum Champion
Sheet Author
API Scripter
You 'can' do it but will lose visibility of the actual hit roll: /em deals [[ [[ {1d20+6}>@{target|ac} ]] * [[ 1d6 + 3 ]] ]] damage!