-
Multiple conditions in if/else statement.
This is something ive been wondering for a while but havent ran into an urgent situation to use it til now.
the SET UP:
i have basically a glorified slide show going on..with the typical effect as taking a picture, cutting out pieces and zooming in and out creating depth with paralax and lens blur. So i have a LOT of these comps set up and what ive done is made a null called “controller” that i can just duplicate into each comp and parent all of the layers to…heres whats on the Nulls position…
rev=effect(“reverse”)(“Checkbox”);
z=time*effect(“Speed”)(“Slider”);
zR=time*-effect(“Speed”)(“Slider”);pIn=value+[0,0,z];
pOut=value+[0,0,zR];if(rev==true){pIn
}else{
pOut
}So i have a slider controlling the speed of the push in, and a checkbox if i want to reverse it and pull out. My question can pertain to this setup but i found a work around that works cuz i will always be either pushing in or pulling out…but heres what i cant work around.
the QUESTION:
id like to also just be able to make a checkbox on the null named rotate CW and one named rotate CCW, and to be able to check one or the other to make the scene rotate as its pushing in, my problem is i know i can set it up like previously shown BUT i want to be able to just leave the rotation off by leaving the boxes unchecked if i want to. Which is why i need to know how to “correctly” say.
rCCW=effect(“Rotate CCW”)(“Checkbox”);
rCW=effect(“Rotate CW”)(“Checkbox”);zRotCCW=value-time/2;
zRotCW=value-time*2;if(
if(rCCW==true)zRotCCW
and if (rCW==true)zRotCW
and if (rCCW&&rCW==false)0,….So how do i say all of that in one if/else statement?
sorry if this took forever to explain, i like to not just explain the specific script question but also the application for it incase someone has a better way to the solution all together. thank you.