-
Linking slider amount to index
I may have an impossible question. I have a very simple expression to control the visibility of layer duplicates using a slider. The null layer with the slider is layer #1, hence the “index-1” in the expression.
slider=thisComp.layer("controls").effect("Number of Duplicates")("Slider")if(slider>=index-1){100}
else{0}So…say I wanted to add another layer at the top. Is it possible to make it so regardless of what the index numbers are, the number of layers at 100 % opacity will match the slider amount? I’m not sure if using “index” will even work, or if maybe there’s another condition I could add to the expression?
I also realize I could just move the null below the other layers or to another comp entirely, but honestly I just want to know if this is possible. I’m new to expressions so it’s interesting to learn new ways of doing things.
Thanks!