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

Backreferencing variables in macros?

Is there any way to backreference an input variable? IE, using power cards: !power --charid|@{character_id} --emote|@{character_name} attempts an amazing acrobatic action. --name|Acrobatic Check --Acrobatics|[[[LR?{difficulty|10}-1] 1d20+@{acrobatics}]] vs @{difficulty} difficulty gets input by the user, and is referenced for the LR (low roll) which highlights the roll in red if it is below or equal to that value. Is there any way to reference that difficulty variable again after it's input, so I can output the DC of the roll?
1411581179

Edited 1411581235
The Aaron
Roll20 Production Team
API Scripter
The user is only queried for a specific value once. If you use the ?{difficulty|10} more than once, each use will receive the single value that was input by the user: !power --charid|@{character_id} --emote|@{character_name} attempts an amazing acrobatic action. --name|Acrobatic Check --Acrobatics|[[[LR?{difficulty|10}-1] 1d20+@{acrobatics}]] vs ?{difficulty|10}
Ah excellent, I should have tried that. Thanks!
1411592656
The Aaron
Roll20 Production Team
API Scripter
no problem!