-
Multiple if/then statements
Hello there,
I am wondering if it is possible to apple more than one if/then statements to the same layer. For example, I am wanting to “fence” an object to the bounds of the composition, or use it in other situations.
I have separated the dimensions of a layer, and tried to apply two if/then statements to it, saying if the x value is bigger than the edge of the comp, make it stick to the edge of the comp, if it isn’t bigger, do nothing. I am wanting to apply a second if/then statement for the other side of the comp, so I have one for the left side, one for the right side and two additional ones on the y dimension.
Thanks!
if (transform.xPosition > 1012) 1012 else transform.xPosition;
if (transform.xPosition < 268) 268 else transform.xPosition;