ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

else If statment is acting weird

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Assaf Goldlust
else If statment is acting weird
on Jun 14, 2017 at 7:22:34 pm

i encountered one frustrating problem.
i tried to else if statement in the following matter.
Blue=comp("Animation").layer("Blue Line").content("Trim Paths 1").end;

if (Blue==18){OP}else{0}

the bothersome part start when the Statement is treating the condition as false. even tough this Blue line is actually qual to 18.

i started to play around with it, the moment i changed the "==" to ">" its suddenly worked as it should,

any ideas what the hack is going on? i just cant seem to figure this out, thanks.

Return to posts index

Dan Ebberts
Re: else If statment is acting weird
on Jun 15, 2017 at 12:45:33 am

My guess is that Blue may not be exactly 18. It might appear as 18 in the UI but actually be 18.00001 or something similar.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved