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 help

ok so currently I have the Following macro Created  &{template:default}{{name=Overrun}}{{Hit:=[[1d20+10+?{Hit|0}]]}}{{Dmg:=[[6+?{Damage|0}}]]}} I am trying to add an addendum where it takes the result of the Hit and displays it again with a -5 with a note attached to it
1577605471
GiGs
Pro
Sheet Author
API Scripter
Unfortunately you cant reuse the results of rolls, or display them a second time. The best that you could do is just put another entry beneath it, iwth the -5 and let people apply it manually. Like  &{template:default}{{name=Overrun}}{{Hit:=[[1d20+10+?{Hit|0}]]}}{{Note=-5 note here}}{{Dmg:=[[6+?{Damage|0}}]]}}
1577605567
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If by "Hit" you mean the roll query, you can reference it again in the same macro as ?{Hit}. A query is filled in once and then the same choice is used for every instance thereafter. If however you mean the result of the calculation: [[1d20+10+?{Hit|0}]] That cannot be used again. Roll20 dice rolls are "fire and forget". This would only be possible with a roll template (baked into the character sheet), or an API script of some kind (Pro perk).