Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Occasional Pause on a Random Number Cycle Expression

  • Occasional Pause on a Random Number Cycle Expression

    Posted by Eric Jordan on August 6, 2015 at 9:34 am

    Hi Guys….

    Looking for a way to occasionally pause a random number cycle expression so that random number set holds for a few seconds before proceeding to continue its random cycling.

    At the moment I have a source text layer connected to a null with a slider control.

    Source text layer expression:

    random(6);
    thisComp.layer("Slider").effect("Slider Control")("Slider").value.toFixed(1);

    Null Slider Expression:

    random(900);

    Using AE CC 2015.

    Thanks for any insight….
    Eric

    Xavier Gomez replied 10 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Xavier Gomez

    August 6, 2015 at 6:26 pm

    This should work:

    x = effect("value")("Slider");
    holdTime = 2;
    holdTimeErr = 0.5;
    rdmTime = 10;
    rdmTimeErr = 2;
    hold = false; // change to true to start with a value on hold;

    f = timeToFrames(inPoint);
    F = timeToFrames(time);
    h1 = timeToFrames(holdTime-holdTimeErr);
    h2 = timeToFrames(holdTime+holdTimeErr);
    r1 = timeToFrames(rdmTime-rdmTimeErr);
    r2 = timeToFrames(rdmTime+rdmTimeErr);
    while(f

    Xavier

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