Random
Function. Outputs a random float value within a specified range.
The result is greater than or equal to Start and strictly less than End. Each time the block is evaluated (per particle creation or per frame, depending on the chain), a new random value is produced.
Properties & inputs:
- Start (input | property): Lower bound of the range (inclusive).
- End (input | property): Upper bound of the range (exclusive).
Output:
- Random float value in the range [Start; End).
Unreliable in the construction chain
Feeding Random into a constructor input (Color, Size, Alpha, ...) is discouraged. The construction chain runs at rendering time — an arbitrary number of times per simulated frame — so a random evaluated there cannot produce a stable, reproducible value: the editor preview shows a constant, and game runtimes re-evaluate it every rendered frame. Wiring Random (directly or through other function blocks) into a constructor input flags the block with a warning in the Emitter Scheme (amber outline + tooltip). The effect still exports and plays — the warning does not block anything — but the result is unlikely to be what you want.
To get a reliable random value into a constructor input:
- Store it per particle at spawn: use a Custom Property written on particle init (in Emitter Guide — a Custom Value with On Init enabled), then wire the stored property into the constructor input.
- Or compute it in the update chain and pass the stored result on.