Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions How do I randomly change between six variables every second

  • How do I randomly change between six variables every second

  • Jeremy Krzmarzick

    April 30, 2020 at 6:19 pm

    seedRandom(Math.floor(time), timeless = true);
    c1=thisComp.layer("Null 1").effect("Color Control")("Color");
    c2=thisComp.layer("Null 1").effect("Color Control 2")("Color");
    c3=thisComp.layer("Null 1").effect("Color Control 3")("Color");
    c4=thisComp.layer("Null 1").effect("Color Control 4")("Color");
    c5=thisComp.layer("Null 1").effect("Color Control 5")("Color");
    c6=thisComp.layer("Null 1").effect("Color Control 6")("Color");

  • Dan Ebberts

    April 30, 2020 at 6:40 pm

    Something like this should work:

    seedRandom(Math.floor(time), timeless = true);
    c1=thisComp.layer(“Null 1”).effect(“Color Control”)(“Color”);
    c2=thisComp.layer(“Null 1”).effect(“Color Control 2”)(“Color”);
    c3=thisComp.layer(“Null 1”).effect(“Color Control 3”)(“Color”);
    c4=thisComp.layer(“Null 1”).effect(“Color Control 4”)(“Color”);
    c5=thisComp.layer(“Null 1”).effect(“Color Control 5”)(“Color”);
    c6=thisComp.layer(“Null 1”).effect(“Color Control 6”)(“Color”);
    idx = Math.floor(random(6))+1;
    eval(“c” + idx)

    Dan

Viewing 1 - 2 of 2 posts

Log in to reply.

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