-
Stacked if else with multiple var results
Basically I’m trying to manually move a layer’s X position only. Being driven from a slider which is also being used elsewhere to drive the source text of another layer.
Ive never stacked if else / else if before. The code doesnt break anymore, I’ve worked my way through that but I have a problem.
It seems in my code the value being returned is only the first variable and all other results are omitted all the way through. Im thinking maybe its the way the code is formatted? Maybe I haven’t defined the other potential variables?
Maybe someone can shed some light on this.
h = comp("Controller").layer("Eastern Time Control").effect("Hour")("Slider").value;if (h = 12){
x = 960;
}else if (h = 11){
x = 800;
}else if (h = 10){
x = 700;
}else{
x = value;
}[x, value[1]]