-
When If Else Condition met Value should not change suddendly-Should change in defined time duration
Hi Folks,
I am working on an after effects project. Where I have 5 shape layer. I have indexed these shape layer positions as per the attached slider counter number value.
Here is expression code of one layer attached with “v” slider:
v=thisComp.layer("Null 2").effect("v")("Slider");
w=thisComp.layer("Null 2").effect("w")("Slider");
x=thisComp.layer("Null 2").effect("x")("Slider");
y=thisComp.layer("Null 2").effect("y")("Slider");
z=thisComp.layer("Null 2").effect("z")("Slider");
var arr = [x,y,z,v,w];
arr.sort(function(a, b){return b - a});
t=15;
var r =arr.indexOf(v);
if ( r >= 0 && r<1) {
295.9059;
} else if ( r >= 1 && r<2) {
503.9059;
} else if (r >= 2 && r<3) {
711.9059;
} else if (r >= 3 && r<4) {
919.9059;
} else if (r >= 4 && r<5) {
1127.9059;} else {
value;
}When the above condition met for example:
if ( r >= 0 && r<1)position will be{. I want to achieve that when any condtion met such as in this example then position value should not change suddenly. It will go from Previus position to next position (after fullfilment of if else condition (for eg 295.9059;)) in defined time such as one second of duration.
295.9059;
Please help;
Sorry for my bad English;Carl Ranger


