π¦ 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:
0. - to (Number): Maximum possible value (upper limit). Default:
100. - decimal (Boolean): If
True, generates decimal numbers. IfFalse(default), generates only integers.
π€ Outings
- value (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
Falseto get integer values. - Connect the value 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).
Updated on: 04/03/2026
Thank you!
