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

Trying to save an inputted value into macro to put into another place within same macro

February 27 (8 years ago)
Trying to save an inputted value into macro to put into another place within same macro.

For instance I have 6 Attributes, STR, DEX, CON, INT, WIS, CHA.  I want to pick ONE and then have that SAME VALUE input into another part of the same macro.  Is this possible? I have no idea how to do this if it is.  Please help
February 27 (8 years ago)

Edited February 27 (8 years ago)
The Aaron
Pro
API Scripter
If you repeat the same roll query, it's value will be duplicated:
/r 1d20+?{Which Stat|STR,@{selected|STR}|DEX,@{selected|DEX}}
You added ?{Which Stat} to your roll.

February 27 (8 years ago)
To learn more about macros in general, I recommend reading through some of the pages listed on the Roll20 Wiki's Main Page, including:

In your situation, I would recommend starting with Dice Reference and Macros.
February 28 (8 years ago)
I don't want to ask for the value again.  Won't that just prompt the user for a value AGAIN?
February 28 (8 years ago)

Edited February 28 (8 years ago)
When you Submit a Roll Query (i.e. assign it a value), every following Roll Query that shares the same name is parsed to the value of the first. e.g. If you Submit the default value of ?{Query|Value}, all future Roll Queries named 'Query' will be parsed to 'Value'.
[[ ?{One|1|1} + ?{One} + ?{One|193} ]] equals three

Try testing the example that The Aaron provided as an Ability on your Character.