-
recalling an if else statement?
Hi,
I was looking to see if this is possible with an if else statement…I have a pretty complicated character rig setup. What I want to do is have an expression slider setup to move the position of the legs so that when the slider is moved into the positive numbers the legs will move to the centre of the body and when the slider is moved into the negative numbers the legs also move into the centre of the body. So what is happening is this, at 0 the legs are at their furthest apart, the character is facing forwards. When I move the slider in the positive direction the legs move closer together giving the illusion that the body is turning. The reason I want the legs to also move into the centre of the body when the slider is moving in the negative direction is because I am using a opacity trick that will turn layers on and off depending if the slider is in the positive or negative. This way one leg will be in front of the body and the other will be behind giving the illusion that the character is turning around. Sorry if it is a bit hard to understand. This is what I was thinking but it is not working…
n = thisComp.layer(“Controllers”).effect(“Body Turn”)(“Slider”);
j = if (n>0) -1 else 1;
[value[0] + j , value[1]]Does anyone have a better idea? I have looked around the net and stumbled upon functions but are not too sure how to use them?
Cheers,
Brad