getNewRolls: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getNewRolls() | getNewRolls() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 16: | Line 16: | ||
Make some dice rolls and show the individual rolls at each step. | Make some dice rolls and show the individual rolls at each step. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
Roll 1d10: [e: 1D10+2]<br> | Roll 1d10: [e: 1D10+2]<br> | ||
Get New Rolls: [r: getNewRolls()]<br> | Get New Rolls: [r: getNewRolls()]<br> | ||
Line 25: | Line 25: | ||
'''Output:''' | '''Output:''' | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
Roll 1d10: « 1D10+2 = 3 + 2 = 5 » | Roll 1d10: « 1D10+2 = 3 + 2 = 5 » | ||
Get New Rolls: [3] | Get New Rolls: [3] | ||
Line 35: | Line 35: | ||
Remember that it returns all the new die rolls since the last time it was called. | Remember that it returns all the new die rolls since the last time it was called. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
Roll 1: [e: 3d6]<br> | Roll 1: [e: 3d6]<br> | ||
[r: getNewRolls()]<br> | [r: getNewRolls()]<br> | ||
Line 43: | Line 43: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
'''Output''' | '''Output''' | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
Roll 1: « 3d6 = 16 » | Roll 1: « 3d6 = 16 » | ||
[5,6,5] | [5,6,5] |
Revision as of 20:43, 14 March 2023
getNewRolls() Function
• Introduced in version 1.5.2
Returns an array of all the raw, i.e. unmodified, dice rolls since the last call to getNewRolls().
Usage
getNewRolls()
Parameters
none
- Takes no parameters.
Example
Make some dice rolls and show the individual rolls at each step.
Roll 1d10: [e: 1D10+2]<br>
Get New Rolls: [r: getNewRolls()]<br>
Get Rolled: [r: getRolled()]<br>
Roll 3d6 minimum 2: [e: 3D6L2]<br>
Get New Rolls: [r: getNewRolls()]<br>
Get Rolled: [r: getRolled()]
Output:
Roll 1d10: « 1D10+2 = 3 + 2 = 5 »
Get New Rolls: [3]
Get Rolled: [3]
Roll 3d6 minimum 2: « 3D6L2 = 10 »
Get New Rolls: [5,3,1]
Get Rolled: [3,5,3,1]
Remember that it returns all the new die rolls since the last time it was called.
Roll 1: [e: 3d6]<br>
[r: getNewRolls()]<br>
Roll 2: [e: 3d6]<br>
Roll 3: [e: 3d6]<br>
[r: getNewRolls()]
Output
Roll 1: « 3d6 = 16 »
[5,6,5]
Roll 2: « 3d6 = 17 »
Roll 3: « 3d6 = 6 »
[5,6,6,3,2,1]