getRolled: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
|||
Line 9: | Line 9: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
getRolled() | getRolled() | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|none|Takes no parameters.}} | {{param|none|Takes no parameters.}} | ||
Line 21: | Line 21: | ||
Roll 3d6 minimum 2: [e: 3D6L2]<br> | Roll 3d6 minimum 2: [e: 3D6L2]<br> | ||
Get Rolled: [r: getRolled()] | Get Rolled: [r: getRolled()] | ||
</ | </syntaxhighlight> | ||
'''Output:''' | '''Output:''' | ||
Line 29: | Line 29: | ||
Roll 3d6 minimum 2: « 3D6L2 = 13 » | Roll 3d6 minimum 2: « 3D6L2 = 13 » | ||
Get Rolled: [9,6,5,1] | Get Rolled: [9,6,5,1] | ||
</ | </syntaxhighlight> | ||
|also= | |also= |
Revision as of 19:09, 14 March 2023
getRolled() Function
• Introduced in version 1.5.2
Returns a JSON Array of all the raw, i.e. unmodified, dice rolls that have occurred within the current macro context.
Usage
<source lang="mtmacro" line> getRolled() </syntaxhighlight> Parameters
none
- Takes no parameters.
Example
Roll some dice and observe the unmodified rolls.
<source lang="mtmacro" line>
Roll 1d10: [e: 1D10+2]
Get Rolled: [r: getRolled()]
Roll 3d6 minimum 2: [e: 3D6L2]
Get Rolled: [r: getRolled()]
</syntaxhighlight>
Output: <source lang="mtmacro" line> Roll 1d10: « 1D10+2 = 9 + 2 = 11 » Get Rolled: [9] Roll 3d6 minimum 2: « 3D6L2 = 13 » Get Rolled: [9,6,5,1]
</syntaxhighlight>