Random - Hold - Random

Moderators: Disciple, zlovatt

Post Reply
Posts: 20
Joined: May 21st, 2004, 3:03 pm

May 24th, 2004, 2:42 am

Problem : How to apply a random value to an effect and then have it hold before going back to randomness?

Solution 1 (posted by Dan Ebberts on AE List October 14 2002)

Use the seed_random function. Example:


When you want a different value, change the value of the
seed. Example:

if (time<1){

This expression could be used to set opacity to a random
value for the first second of the comp and a different
random value for the remainder of the comp.

Solution 2 (posted by Brian Higgins on AE List 0ct 22 2002)

(This will work in the X dimension only)

1. Add the Expression Controls effect "Slider Control" to the layer in
question, and rename it "sx."
2. Add the following expression to the layer's scale property:

foo = wiggle(10,30,2) * effect("sx").param("Slider");

wiggle() will return an array when used in an expression applied to a
layer's scale (b/c yourlayer.scale is an array.) Keyframe the slider from
0 - 100, and your layer will scale on in a wiggle-o-matic fashion! You may
want to add another slider control and multiply it by the wiggle function's
amplitude (the "10" in the above expression), and then keyframe that slider
control to 0 to stop the layer from wiggling anymore after it's at its
desired scale.
Post Reply