-
Conditinal statement if/else
Hey guys,
I am trying to link opacity to the “Settings” adjustment layer, on a settings layer there are 4 slider controls and one checkbox control.
I want to achieve if any of the sliders is equal to an index number, the opacity will be 100, and another state if those are not true, is that if the checkbox is checked then opacity will be 100.
My code only “listens” checkbox control
This is my code:
var a = thisComp.layer("Settings").effect("01")(1);
var b = thisComp.layer("Settings").effect("02")(1);
var c = thisComp.layer("Settings").effect("03")(1);
var d = thisComp.layer("Settings").effect("04")(1);
var e = thisComp.layer("Settings").effect("Visibility")(1);
if(a == index || b == index || c == index || d == index){
100;
}else{
0;
}
}if(e == 1){
100;
}else{
0;