-
try catch try catch try catch
try{
thisComp.layer(index+1).effect(“bar_index”)(“Slider”).value +1;
}catch(err){
thisComp.layer(index+2).effect(“bar_index”)(“Slider”).value +1;
}This does exactly what I want.
Now…
Is there a way I can add more
thisComp.layer(index+3).effect(“bar_index”)(“Slider”).value +1;
thisComp.layer(index+4).effect(“bar_index”)(“Slider”).value +1;I tried a for loop with no success. I simply got the index of the layer rather than just +1 (So I got 6 +1 if it was the 6th layer).
Unless someone knows a for loop that can incorporate this, is there anyway I can try catch, try catch. I can’t imagine there being a gap of more than 3 or 4, but if there’s an infinite way that would be cool.