Expression Library

Random Value (at specified intervals)

While random() will generate a random value every frame, this variation allows you to control how often the values are generated, allowing you to effectively slow down the effect.

Code Sample

Hover over the code and click the copy button.

					myStart = framesToTime(0); // replace the 0 with the frame number at which you want the expression to start.
frames = 3; // the number of frames you want to hold each random value.
seed = Math.floor((time - myStart)/framesToTime(frames)); seedRandom(seed,true)
random(min, max) // specify your value range