Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Radnom expressions help…

  • Radnom expressions help…

    Posted by Stephen Reber on July 22, 2009 at 9:39 pm

    Hey all.

    I know this is pretty simple, but I just can’t find it in my notes, nor do I remember how.

    I need to have my “random” expression jump from 0 to 1 with no variation in between. So the value will be either 1 or 0.

    I know I’ll feel real stupid when I find out the answer.

    Thanks in advance…

    Stephen =]

    Ben Rollason replied 16 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Ben Rollason

    July 23, 2009 at 10:12 am

    random(1) > 0.5;

    will give you a 0 or a 1 randomly on each new frame. If you want more control, try:

    tSpeed = 1;
    noise(time*tSpeed) > 0;

    and then adjust the speed variable to make it go faster or slower.

    – Ben.

    http://www.benrollason.com

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