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);
x =linear(ftime,anim_start,anim_end,0,copies);
x = linear(ftime,225,243,copies,0);

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 :)

  • Try putting the clauses of the if … else … expression in {braces}.
    – stib
    Aug 7, 2020 at 9:39
  • @Barbara - We can merge the two accounts you currently have, if you like, then you will be able to comment. At the moment it looks like you just created 2 accounts by accident.
    – Dr Mayhem
    Aug 17, 2020 at 15:07


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.