ReferenceScripting APIMotionScenerandom
MotionScene.random
methodA random number: 0 to 1, 0 to max, or min to max.
| Name | random |
|---|---|
| Kind | method of MotionScene |
| Called as | scene.random(…) |
| As a node | Random Number in Range (logic graph) |
| Since | 0.3 |
Syntax
random( min?: number, max?: number): numberParameters
| Name | Type | Description |
|---|---|---|
min | number | Optional. The lowest (or the highest, alone) |
max | number | Optional. The highest |
Returns
number: the number (the same each run for the same seed).
See also
In examples: Rain Harbour
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.