Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Multiple commands not taking effect.

  • Multiple commands not taking effect.

    Posted by Justin Maloney on March 11, 2015 at 4:05 pm

    Hey there, I have a dumb question.

    I have an animation of a piston with a pressure gauge. When the top of the piston (called “Stopper” in my comp) comes down, I want the needle (simply called “Needle”) to both turn, and wiggle more. My problem is that needle layer seems to only follow one of the expressions, the one that comes first, and ignore the other. The expression doesn’t break either.

    I tried throwing sliders onto my needle layer, and tying the wiggle layers to those, then tying the sliders to the Y value of the Stopper, thinking that would somehow work. Same result.

    Dumb question, I know. And I can’t just animate it by hand. I’m making this for scientists who have almost zero knowledge of how to use Adobe products. So this stuff needs to be as automated as possible.

    Thanks is advance!

    thisComp.layer("Stopper").transform.yPosition;
    wiggle(effect("Frequency")("Slider"),effect("Amplitude")("Slider"))

    Daniel Cameron replied 11 years, 4 months ago 3 Members · 4 Replies
  • 4 Replies
  • Justin Maloney

    March 11, 2015 at 4:37 pm

    Just found a solution, for anybody who is interested. I just added a “+” between the two lines.

    thisComp.layer("Stopper").transform.yPosition + wiggle(effect("Frequency")("Slider"),effect("Amplitude")("Slider"))

  • Dan Ebberts

    March 11, 2015 at 4:43 pm

    You can’t combine expressions by just stacking them on top of each other. You need to combine the results. In your case it would be something like this (not tested):

    y = thisComp.layer(“Stopper”).transform.yPosition;
    w = wiggle(effect(“Frequency”)(“Slider”),effect(“Amplitude”)(“Slider”))-value;
    [value[0],y] + w

    Dan

  • Justin Maloney

    March 11, 2015 at 4:46 pm

    Thanks Dan! For the solution and the knowledge!

  • Daniel Cameron

    April 23, 2015 at 3:30 pm

    Cudos to both of you.

    Dan for the knowledge, and you Justin for a basic work around that worked for my needs, and as a expression newb was easier to grasp. lol

    Great stuff

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