Random: 0.0 to 1.0 (Expression Function Reference)

 
 
 

The Function Random Random: 0.0 to 1.0 command in the expression editor inserts the token rand_0_1([<seed>]) at the insertion point in the editing pane. This token generates a random number between 0.0 and 1.0 at each frame. Replace the dummy argument as follows:

[<seed>]

Replace with an expression for a seed value used to sow the random number generator. This argument is optional.

If you supply a seed, pseudo-random numbers are generated for each frame. These numbers are the same each time you play back the scene.

If you do not supply a seed, the generated values are closer to being truly random. However, they will be different each time you play back the scene.

Example 1

rand_0_1()

Generates a random number between 0.0 and 1.0 at each frame. The sequence is different each time you play the scene back.

Example 2

randBool(17)

Generates a random number between 0.0 and 1.0 at each frame. The sequence is the same each time you play the scene back.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License