Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects random wiggle with probablility

  • random wiggle with probablility

    Posted by Accountclosedduetonorealnameused on February 13, 2007 at 3:42 pm

    I have a simple expression for random wiggle:

    seedRandom(13,true);
    wiggle(2,7)

    I would like to add code that would introduce probability, so if probability = 0 there the expression would yeild no wiggle, and if it were 100 it would wiggle all the time (yeilding the same result as the expression above)

    thanks!

  • 2 Replies
  • Colin Braley

    February 13, 2007 at 4:08 pm

    Maybe something like this…I’m not sure if I know what you mean

    probability = 12;//some number from 0-100
    seedRandom(index, true);
    shouldWiggle = random(0, 100);
    if( shouldWiggle < probability ) wiggle(2,7) else value I don't hava AE at this machine but I think that should do the trick. ~Colin

  • Accountclosedduetonorealnameused

    February 14, 2007 at 4:57 pm

    Colin, this seems to turn the wiggle OFF at a probability of 71 or less and ON at a value of 72 or above, only.

    any ideas?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy