Activity › Forums › Adobe After Effects Expressions › Make a linear Loop
-
Dan Ebberts
May 27, 2009 at 1:28 pmMaybe like this:
period = 6;
delay = 1;
if (time > delay) {
t = (time-delay)%period;
t <= period/2 ? linear(t,0,period/2,0,100) : linear(t,period/2,period,100,0) }else{ 0 } Set the delay to whatever you want. Or, it would be pretty easy to make the delay a random value, like this: period = 6; minDelay = 0; maxDelay = 5; seedRandom(index,true); delay = random(minDelay,maxDelay); if (time > delay){
t = (time-delay)%period;
t <= period/2 ? linear(t,0,period/2,0,100) : linear(t,period/2,period,100,0) }else{ 0 } Dan -
Koby Goldberg
May 27, 2009 at 2:21 pmYou could also use the inPoint of the layer to choose the desired delay, in a way that if you move the layer in timeline to start later, the effect would start later.
In order to do this, you could use Dan’s last expressions and just replace the delay to this:
delay = inPoint;Koby.
Reply to this Discussion! Login or Sign Up