I have set up a pretty simple expression that animates the number of copies of a shape layers' repeater:
copies = 14;
anim_start= 12;
anim_end = 32;
ftime = timeToFrames(time,25);
if(ftime<anim_end)
x =linear(ftime,anim_start,anim_end,0,copies);
else
x = linear(ftime,225,243,copies,0);
x;
It works fine if I replace "anim_end" with a number, but what it does now is have 0 copies at frame 11, and 14 copies one frame later. I am confused why AE won't exept my variable "anim_end". Can someone point me in the right direction?
thanks, Barbara
edit: since I can't comment on the answer that was already given: putting { brackets in the if-else clause did not change anything, unfortunately. Thanks anyway :)
if … else …
expression in{braces}
.