Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression. Movement x-postion needs fixed start time.

  • Expression. Movement x-postion needs fixed start time.

    Posted by Kasper Nyman on May 20, 2014 at 1:08 pm

    Hi all you smart people.

    I’ve got this script:

    x = (time / thisComp.frameDuration) * 150;
    value + [-x, 0]

    The only thing I want more, is to somehow fixed controll when the layer/comp is moving. Like when the timeline hits 1 sec. it moves and then I can copy this to another layer and make it move then timeline hits 2 sec. So in a way I can make a “fixed-randomness”.

    Best,
    Kasper

    x = (time / thisComp.frameDuration) * 150;
    value + [-x, 0]

    Nyman

    Dan Ebberts replied 11 years, 12 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    May 20, 2014 at 3:58 pm

    Something like this maybe:


    delay = 1;
    myDelay = index*delay;
    if (time > myDelay){
    x = timeToFrames(time - myDelay)*150;
    value - [x,0]
    }else
    value

    Dan

  • Kasper Nyman

    May 20, 2014 at 4:22 pm

    Thank you so much, Dan! That works perfectly.

    Do mind share some words on how it works, just so I can learn?

    Nyman

  • Dan Ebberts

    May 20, 2014 at 4:30 pm

    Each layer’s start time (myDelay) is calculated to be the delay (1 second) times the layer’s index (its order in the layer stack). If the start time has been reached, the additional distance (x) is calculated as the time since the start time (time-myDelay) multiplied by the velocity (150).

    Dan

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