ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Triggering Repeating animation with Markers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Owen Rucker
Triggering Repeating animation with Markers
on Feb 13, 2018 at 3:57:57 pm

I want to make either a null or slider move X amount every time it hits a layer marker. In this case x = -135.

BUT

I don't want it to start from 0 every marker, which is the only thing I can find right now.

So if it's a slider, when it hit's the first Marker 1 it moves from 0 to -135. I don't know how to make Marker 2 trigger -135 to -270. Marker 3 from -270 to -405. And so on and so forth.

Is this possible?


Return to posts index

Dan Ebberts
Re: Triggering Repeating animation with Markers
on Feb 13, 2018 at 5:26:18 pm

If you want it to jump at each marker, you could do it like this:


n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) n--;
}
value + [-135*n,0]


If you want it to slide, it would be like this:


n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) n--;
}
x = 0;
if (n > 0){
easeTime = .25;
t = time - marker.key(n).time;
x = ease(t,0,easeTime,-135*(n-1),-135*n);
}
value + [x,0]



Dan



Return to posts index

Owen Rucker
Re: Triggering Repeating animation with Markers
on Feb 13, 2018 at 6:08:36 pm

This works. Thanks so much!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]