random_number() and aliases
On this page
random_number(minimum = 0, maximum = 1)Choose a random floating-point value in the supplied range.
Returns: Number.
Aliases: random_float()
random_number(0.25, 0.75)With one argument, it is the minimum and the maximum remains 1. Use two arguments for clarity.
randomize()#
randomize(seed_value?)Reseed the shared random generator. Omit the seed for normal varied play; pass a seed for reproducible tests.
Returns: Null.
randomize(1234)The generator is shared with other random work. Do not reseed on every roll.
choose()#
choose(values, fallback = null)Pick one entry from an array.
Returns: Selected value; fallback for an empty/non-array value.
choose(["Locked.", "Still locked."], "No reply.")