At this point you should be able to create all kinds of advanced actions. However, up until now, all the actions are static, meaning they are the same every time. Dynamic parameters allow you to create actions that are different every time they are performed. Dynamic parameters can be passed as arguments to most vizact actions. The value of these parameters is determined when the action is performed, and you can setup these parameters to change values every time.
For example, let's modify an action so that it waits for a random amount of time:
RandomTime = vizact.randfloat(0.5,3.0)
wait = vizact.waittime(RandomTime)
Now every time the wait action is performed, it will wait a random amount of time between 0.5 and 3.0 seconds. You can also create a dynamic parameter that will choose a value from a pre-specified list. For instance, let's assume we have a list of texture objects called textures. With dynamic parameters, we can easily create an action that will animate these textures onto an object:
Instead of looping through the textures sequentially, you could randomly pick a texture by creating the dynamic parameter the following way:
Dynamic parameters:
randfloat, randint
choice-- loop, play, swing, random,
elapsed
retval
Action synchronization and management