-
“IF” Statement Does Not Work
Hello everyone!
I’ve been trying to write an expression for position. I want to make it move down when that object’s scale is [100,100]. Scale has an expression that makes it scale from 0 to 100 at any random time in composition. The thing is when I write “if” statement in position expression to check if the scale is 100 or 0 it always works as 100 and I don’t understand why. Can anyone help with that?
//scale expression for the object:
seedRandom(1,true);
rand = random()*thisComp.duration;
if (time>=rand){[100,100];}
else{[0,0];}//Position expression for the same object:
scale = content("Group 1").transform.scale; //pickwhiped from scale
t = time;
seedRandom(0,true);
if (scale = [0,0]) {
y=0; x=0;
value + [x,y]};
if (scale = [100,100]){
y = random()*10 * t ;
x = 0;
value + [x,y];}