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

Help Chaining Macros

Hey I am very new to Roll20 and just found out I can do macros today. Ive been playing with them all day and am getting close to were i personally want to be be but need help. Is there a way to set a delay within a macro between actions? Basically I have my Attack macro that rolls my attack. I would like to have it so that it will roll my attack and THEN activate my Damage macro which i set to have a query that asks if its a crit (if you say yes it rolls crit damage if no it rolls standard) the problem im having is that the order of operations does both macros at the same time which means it asks me if the damage is a crit before it even rolls if I hit. Can anyone help me with this? is there a fix? Also if we can fix this the next step would be trying to set it up to automatically tell if its a crit and roll the proper damage without asking me. I know how to set the crit range and all that but is there a way to set an IF ? like IF crit roll 2d10+10?
1555192681
GiGs
Pro
Sheet Author
API Scripter
You cant do exactly what you want. There is no way to do IF statements in macros, and you cant delay the execution of a macro. What you can do is print a button to launch the damage macro, along with the attack roll. So you click the attack macro, it rolls the attack and prints out a button. You then click the button, but will still need to use the query to set it as a critical. The code for a button is decsribed in this thread:&nbsp; <a href="https://app.roll20.net/forum/post/7368718/is-there-a-way-to-have-the-player-select-a-couple-of-options-and-then-have-a-macro-call-another-one-dot-dot-dot/?pageforid=7368779" rel="nofollow">https://app.roll20.net/forum/post/7368718/is-there-a-way-to-have-the-player-select-a-couple-of-options-and-then-have-a-macro-call-another-one-dot-dot-dot/?pageforid=7368779</a>
1555317335

Edited 1555318167
i think this one could help ya&nbsp; <a href="https://app.roll20.net/forum/post/7376678/some-useful-attack-macros" rel="nofollow">https://app.roll20.net/forum/post/7376678/some-useful-attack-macros</a> edit-you know what scratch that, i mean it could help ya but i can be even more direct. what you need to do is make 2 macros, for damage and for crit. lets call them dmg and crit for now. then your 3rd macro for the actual attack should look like this: @{charName|wtype}&amp;{template:atk} {{mod=+[[[[@{charName|strength_mod}+@{charName|pb}]]]]}} {{rname=[weaponName](~charName|dmg)}} {{rnamec=[weaponName](~charName|crit)}} {{r1=[[@{charName|d20}cs&gt;20 + 4[STR] + 3[PROF]]]}} @{charName|rtype}cs&gt;20 + 4[STR] + 3[PROF]]]}} {{range=}} {{desc=}} {{spelllevel=}} {{innate=}} {{globalattack=@{charName|global_attack_mod}}} ammo= @{charName|charname_output} a damage macro could look like this:&amp;{template:dmg} {{damage=1}} {{dmg1flag=1}}{{dmg1=[[2d10+@{charName|strength_mod}]]}} {{dmg1type=Slashing}} and a crit could look like this:&nbsp;&amp;{template:dmg} {{damage=1}} {{dmg1flag=1}}{{dmg1=[[2d10+@{charName|strength_mod}]]}} {{dmg1type=Slashing}}{{crit=1}}}{{crit1=[[2d10]]}}&nbsp;