ubiquity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
ubiquity(times) | ubiquity(times) | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
u(times) | u(times) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|times|The number of times to roll the dice.}} | {{param|times|The number of times to roll the dice.}} | ||
Line 16: | Line 16: | ||
|examples= | |examples= | ||
Roll ten special Ubiquity dice. | Roll ten special Ubiquity dice. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[t: ubiquity(10)] | [t: ubiquity(10)] | ||
</ | </syntaxhighlight> | ||
Returns a number that is between {{code|0}} and {{code|10}}. | Returns a number that is between {{code|0}} and {{code|10}}. | ||
Roll five special Ubiquity dice, using variables. | Roll five special Ubiquity dice, using variables. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: DiceTimes = 5] | [h: DiceTimes = 5] | ||
[t: ubiquity(DiceTimes)] | [t: ubiquity(DiceTimes)] | ||
</ | </syntaxhighlight> | ||
Returns a number than is between {{code|0}} and {{code|5}}. | Returns a number than is between {{code|0}} and {{code|5}}. | ||
Latest revision as of 23:59, 14 March 2023
ubiquity() Function
Generates random numbers to emulate dice rolls; returns the total of a special Ubiquity dice roll. When these dice are rolled, the result is
0
or 1
, this function then sums up all of the dice rolled and returns that sum.Usage
ubiquity(times)
u(times)
Parameters
times
- The number of times to roll the dice.
Examples
Roll ten special Ubiquity dice.
Returns a number than is between
[t: ubiquity(10)]
Returns a number that is between 0
and 10
.
Roll five special Ubiquity dice, using variables.
[h: DiceTimes = 5]
[t: ubiquity(DiceTimes)]
0
and 5
.See Also
For another method of rolling dice, see Dice Expressions.