ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

While and Scale

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Garces
While and Scale
on Feb 27, 2018 at 1:17:55 pm

Hi,

I'm animating sweat in a face and I want an angle control to determine the scale of the sweat at the same rate as it appears.
I'm having issues with the while expression to do so:

j = 0;
TP= (effect("RATE")("Ángulo"));
scalRel = ease(time, TP-TP, TP, [100,100], [0,0]);

while (j < time){
scalRel];


This gets me into an infinite loop and I honestly don't know why.
Can someone help me?
Thank you 😃



Here is the way I have animated sweat in case someone finds it useful:

HEIGHT = (thisComp.layer("CARA").sourceRectAtTime().height)*0.7;
WIDTH = (thisComp.layer("CARA").sourceRectAtTime().width)*0.7;


TP = effect("RATE")("Ángulo");
seed = Math.floor (time/TP);
segStart = seed*TP;

seedRandom(seed, true);
X = random (WIDTH/2,((WIDTH/2)*-1));
Y = random (HEIGHT/2,((HEIGHT/2)*-1));
StartVal = [X,Y];

EndVal = [X,Y+15];

linear(time, segStart, segStart+TP, StartVal, EndVal);


Return to posts index

Dan Ebberts
Re: While and Scale
on Feb 27, 2018 at 2:18:26 pm

You don't have anything in your while loop that increments the value of j, so on any frame except the first frame it will loop endlessly.

Dan



Return to posts index

David Garces
Re: While and Scale
on Feb 27, 2018 at 5:34:02 pm

Thanks for the response Dan.


Return to posts index

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