Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions creating ‘universal’ variable within a comp

  • creating ‘universal’ variable within a comp

    Posted by Brady Baltezore on June 3, 2020 at 6:02 pm

    Hello,
    I’m looking to expand on an expression.

    I’ve got a large number of layers referencing the value contained within an expression slider on a control layer.
    So when I change the value of that slider, each expression referencing it changes accordingly. No problem here.

    What I’d like to do now is use another slider effect to create a value that I can then use to say, stagger the values of some of the individual layers.

    frame lag, for an example:

    thisComp.layer(“layer_x”).transform.rotation.valueAtTime(time-1*thisComp.frameDuration)

    EXCEPT, instead of “time-1*thisComp.frameDuration” I’d like to be able to plug in the reference to an second expression slider.

    Pardon my syntax but something along the lines of:
    “time-(thisComp.layer(“expressionControl”).effect(“variableSlider”).value)*thisComp.frameDuration)

    Can anyone point me in the right direction? I feel like it’s possible but I’m going about it the wrong way.

    Thanks!

    B

    Brady Baltezore replied 6 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    June 4, 2020 at 7:29 am

    I just think you need to insert a (“Slider”) before value.

    time-(thisComp.layer("expressionControl").effect("variableSlider")("Slider").value)*thisComp.frameDuration)

    However, I would do it like this, to be easier to read:

    diff = thisComp.layer("expressionControl").effect("variableSlider")("Slider").value;
    time-diff*thisComp.frameDuration;

    Andrei
    My Envato portfolio.

  • Brady Baltezore

    June 7, 2020 at 9:08 pm

    Awesome, thanks for responding!

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