-
Conditional Statement with 2 if’s
I need to add an expression for opacity on a layer. It needs to go to 100% if a value is positive (triggered by a parenthesis in the source text), and go to 0% if a checkbox is turned off. The two statements work fine on their own,but I’m having trouble combining them. Whichever if statement is last in the expression seems to overwrite the first part if statement. What’s going wrong here?
txt = thisLayer.text.sourceText;
if (txt.length > 0 && txt[0] == "(") 100 else 0
if (thisComp.layer("VALUES").effect("On/Off_Value11")("Checkbox")==0) 0 else 100