Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Error in my expression

  • Error in my expression

    Posted by Alberto Fontana on March 7, 2012 at 11:45 am

    Good morning

    I’m new to expressions in AE, and i’m having some problems…

    I want a wiggle to start exactly at time 4:19 and increase over time.
    So i typed into the property:

    if( time > 4.19 ){
    t=(time-5)*20;
    wiggle(5,t);
    }

    But it doesn’t work…when i exit the expression editor, it seems working, (the triangle is grey and the values are red), but when i move around the “current time indicator” in the timeline, the expression crashes and the triangle with the ! becomes yellow.
    Even if i replace 4.19 (float) with an integer value, like 4, the expression doesn’t work.

    Can anybody help me?
    Thanks!

    Alberto Fontana replied 14 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 7, 2012 at 3:47 pm

    The problem is that you’re not telling the expression what to do if the time is less than 4.19. Try it this way:

    if( time > 4.19 ){
    t=(time-5)*20;
    wiggle(5,t);
    }else{
    value
    }

    Dan

  • Alberto Fontana

    March 7, 2012 at 6:18 pm

    Wow, that worked.

    I always programmed in C and Java and i never had to type “else” every time i type “if”. That’s new for me.

    Thanks!

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