π¦ Random number
π¦ Random number
The Random number block allows you to generate a random numerical value between two user-defined limits. It is essential for introducing randomness into experiences, such as game mechanics, simulations or dynamic decisions.
This block provides flexibility to produce integers or decimal numbers, depending on the needs of the scenario.
π₯ Entries
- from (Number): Minimum possible value (lower limit). Default: 1.
- to (Number): Maximum possible value (upper limit). Default: 6 (like a 6-sided die).
- decimal (Boolean): If True, generates decimal numbers. If False (default), generates only integers.
π€ Outings
- result (Number): Random result generated according to the parameters. Can be used in conditions, variables or dynamic displays.
π‘ Example of use
Scenario: Random variation of rewards in a game
- Insert the Random Number block into your feed.
- Set from to 50 (minimum reward).
- Set to to 200 (maximum reward).
- Leave decimal to False to get integer values.
- Connect the result output to a Variable block to store the reward.
- Then display this value via a Text block to inform the player.
βοΈ Technical Details
- Random generation: Uses the native function of the browser or the Celestory engine, with strict management of the limits to guarantee a result in the interval [from, to].
- Decimal precision: If decimal is True, the precision depends on the underlying implementation (usually up to 15 decimal places).
Documented version: v1
Updated on: 06/09/2026
Thank you!
