Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random Y-axis value with expressions

  • Random Y-axis value with expressions

    Posted by Cameron Crook on September 26, 2010 at 5:57 pm

    I am just starting to use more expressions. At the moment i am trying to create an array of lights the width of the comp but only one light in the y-axis. I am trying to use the expression to create a random value for each light only in the y-axis while the x-axis position remains the same. However, when i apply the expression for some reason all of the x-values are randomized as well.

    seedRandom(1,true);
    [transform.position[0],random(0,this_comp.height)];

    Cameron Crook replied 15 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 26, 2010 at 6:19 pm

    If they’re lights, you’ll want to specify the z value as well:

    seedRandom(1,true);
    [value[0],random(0,this_comp.height),value[2]];

    Dan

  • Cameron Crook

    September 26, 2010 at 6:27 pm

    Thanks again you’re a great help.

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