Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Triggering an animation after reaching/returning to a specifc value

  • Triggering an animation after reaching/returning to a specifc value

    Posted by Christopher Rutherford on May 21, 2021 at 7:08 pm

    So I’ve got an expression that’s pulling certain values from a layer (let’s call it Z). Currently, the layer Z gives the value 100 for 1 second, then 200 for 1 second, then 300 for 1 second. I’d like to have different layers (let’s say A, B, and C) appear after each of these values are reached, but I’d like for them to only be visible for a few frames, rather than the whole second.

    It feels like it should be obvious, but I cant seem to crack it. Hell, I don’t even need it to fade in or out, just would need it to disappear sooner.

    Christopher Rutherford replied 5 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    May 22, 2021 at 10:33 am

    I think that you need to link the same event that makes the z layer grow in size. Let’s name these times t1,t2 and t3(I don’t know how you got these for the Z size, but use the same for ABC). Then, on A, B or C opacity write this:

    dur = 0.5
    (time >=t1 && time <= t1+dur) ? 100 : 0;
  • Christopher Rutherford

    May 24, 2021 at 4:40 pm

    I have around 90 layers with an opacity expression that, for a capital Z layer reads

    “v = parseInt(thisComp.layer(“UNICODE”).text.sourceText);

    if (v==90)100 else 0;”

    but for lowercase a layer, reads

    v = parseInt(thisComp.layer(“UNICODE”).text.sourceText);

    if (v==115)100 else 0;

    Etc. The “UNICODE” text layer updates to provide the unicode digits for the last letter to get revealed in a type-on style text animation, (so when it is 90, only the capital Z layer is visible, and when it is 115, only the lowercase a layer is visible).

    So if I’d write the word PiZZaZ, then the P layer reveals, then the i layer, then the Z layer reveals, then the a layer, then the Z layer again. I’d prefer it if the P layer reveals, then the i layer, then the Z layer reveals, the the Z layer reveals AGAIN, then the a layer, then the Z layer again.

    Would there be a way of handling that in the expressions without having 90 “&&” moments in each expression?

    Thanks very much for your time

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