How To's > Work with Dynamic Parameters (Sliders) > Make a Slider Do a Random Walk

Make a Slider Do a Random Walk

Suppose, just for fun, you want a slider value to bounce around in a random walk.

1. Make a slider and name it place.

2. Give the slider this formula: place + RandomPick(-1, 1).

3. In the slider's inspector, set the value of the Max_updates_per_second property to some positive value.

4. Press the slider's animation button and watch the fun.

Note: Were you surprised that you didn't get the dreaded #Circular Reference# error with this slider formula? Slider formulas are allowed to refer to themselves!

See also
Slider Properties Panel
Random Functions

Key Curriculum Press/Key College Publishing
www.keypress.com/fathom