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 - can I store a roll value in-Macro and subsequently reference that value in the same macro?

Use Case:  I want to create a macro that will roll a die and store the value so that it can be referenced later in the same macro. Example:   The macro rolls a 1d100 and stores the value (say '15').  The macro then displays the roll ('15'), the half-value of the roll (floor(15/2) or '7') and the 5th value (floor(15/5) or '3'). I have reviewed the Wiki a few times and cannot figure out how to to capture the die roll in a macro so it can be subsequently referenced later in the macro.  Does anyone have a functioning example they would graciously share with me?  Thank you very much!
1470315698
Pat S.
Forum Champion
Sheet Author
Something like that would be more in the realm of the API.