← Previous | Next →
dice
Description
Rolls a dice with the specified number of faces and returns a random result.
| Name | Type | Possibilities |
| dice | both | 1 |
Parameters
| # | Name | Type | Mandatory | Description | Multiple |
| 1 | faces | integer | Yes | The number of faces on the dice. Accepts any positive integer. | No |
Outputs
| # | Description |
| 1 | The result of the dice roll, a random number between 1 and the specified number of faces. |
Example
interaction
dice 4
tell "You rolled the number 1."
tell "You rolled the number 2."
tell "You rolled the number 3."
tell "You rolled the number 4."
behaviour
nothing