-
Range control by slider
Hi guys
I’m trying to find a way to define a range for calculating the maximum value using the slider. I have 3 layers to calculate and 1 layer that this calculation affects. Slider ranges from 1-3. If slider = 3, the layer value is the maximum z (n1, n2, n3). If slider = 2, the layer value is the maximum z (n1, n2). If the slider = 1, the layer value is the maximum z (n1). I do not know how to define the range of these values for the calculation. Does anyone have an idea?
Thank you very much for your answersn1=thisComp.layer("01").sourceRectAtTime().width;
n2=thisComp.layer("02").sourceRectAtTime().width;
n3=thisComp.layer("03").sourceRectAtTime().width;max = Math.max(n1,n2,n3);