Vizard 8 » Command Index » Vizard modules » vizact » <vizact>.randint
8.0

<vizact>.randint

Create a dynamic parameter that will randomly generate an integer

<vizact>.randint(  
min  
max  
)  
min
The minimum value
max
The maximum value

Remarks

Dynamic parameters allow you to control the input of an action every time it is performed. This dynamic paramter will randomly generate an integer between the given min and max values.

Return Value

A dynamic parameter that can be passed to any function that generates actions.

Example

#Create a dynamic parameter that will generate an integer between 1 and 5
FadeTime = vizact.randint(1,5)

#Create an action to fade from white to black in the number of seconds specified by the dynamic paramter
FadeColor = vizact.fadeTo(viz.BLACK,time=FadeTime)

object.addAction(FadeColor)

See also

<vizact>.choice
<vizact>.randfloat