How-to

Use random numbers

Set a number tag to a random number in a range, such as a dice roll from 1 to 6.

Before you start

  • Have a number tag to hold the number, held by the adventure: Value tags, Adventure details › Tags.
  • Open the logic where the roll happens, such as a line's On Tap Logic, and click Add.

Steps

  1. In the Result window, next to Outcomes, click Add.

  2. Click Adventure. In the Adventure column, click Tags, then your tag. Leave =.

  3. In the second row, click Random Number. Dice Setup shows Random Range, with From and To.

  4. In From and To, type the lowest and highest numbers, such as 1 and 6: in each box, click, press Ctrl+A (⌘A on a Mac), type and press Enter.

    The Outcome window: Coins = Random Number, Dice Setup Random Range, From 1 To 6
  5. Click Save in the Outcome window, then in the others.

Clicking Adventure also shows a second row with its own Tags. That row belongs to another outcome, Add. Use Tags in the Adventure column.

Check it worked

The line reads Adventure → Tag '…' = 'Random(1 to 6)' with your tag. Play-test a few times: the tag holds a different number from the range. Three playthroughs showing the tag gave 1, 5 and 2.

Good to know

See also

Checked against main 9bb38dc, 2026-12-03Report a problem with this page