-
If, or, & and, Statements
Hey there, I’m using alot of if/else statements in my comp and I’m trying to optimize my expressions a little.
Right now I have this on a layers opacity. Basically if one of three check boxes are turned on, the layer doesn’t appear. Here’s what I got right now.v =comp(“99 RENAME ME!”).layer(“Torso Styles”).effect(“V Neck Sweater”)(“Checkbox”);
c =comp(“99 RENAME ME!”).layer(“Torso Styles”).effect(“Crew Neck Sweater”)(“Checkbox”);
s = comp(“99 RENAME ME!”).layer(“Torso Styles”).effect(“Striped Shirt”)(“Checkbox”);
o = value;
if (v==1) o =0;
else if (c==1) o = 0;
else if (s==1) o = 0;else (o = 100);
It works fine and all, but is there a way to say “And” or “Or” to condense my expression? I know “Or” uses the pipes “||” and and is “&&” but I can’t make AE happy. Any help?