-
How can I affect the position of a Null based on multiple Checkbox Controls?
Hello everyone, I’ll try to be as clear as possible with what I’m trying to do:
I have a series of diamonds, 9 of them to be exact. They are all parented to a Null object, and that Null is positioned on the top right of the composition. I have a layer called “Total Diamonds”, with multiple Checkbox Controls inside. Each Checkbox Control will be for how many diamonds (3 ~9 [3 being the minimum, 9 the maximum]) I want to have visible on the screen at a time, while still maintaining their right-aligned orientation on the composition. (This is vital. I want them to stay right-aligned. I know I can just pick-whip the Opacity to a checkbox control or slider, but instead, I want to shift them off-screen behind a Silhouette Alpha layer I have.)
On the Null (the one controlling the position of the diamond, I added the following expressions:
if (thisComp.layer(“Total Diamonds”).effect(“8”)(“Checkbox”) ==1) [799.4,70.0] else [741.7,70.0];
if (thisComp.layer(“Total Diamonds”).effect(“7”)(“Checkbox”) ==1) [856.7,70.0] else [741.7,70.0];
if (thisComp.layer(“Total Diamonds”).effect(“6”)(“Checkbox”) ==1) [914.5,70.0] else [741.7,70.0];
if (thisComp.layer(“Total Diamonds”).effect(“5”)(“Checkbox”) ==1) [972.0,70.0] else [741.7,70.0];
if (thisComp.layer(“Total Diamonds”).effect(“4”)(“Checkbox”) ==1) [1029.7,70.0] else [741.7,70.0];
if (thisComp.layer(“Total Diamonds”).effect(“3”)(“Checkbox”) ==1) [1087.2,70.0] else [741.7,70.0];That being said, I am 100% sure I am doing something incredibly wrong. I don’t know if the position of an object can or can’t be affected by multiple checkbox controls.
How can I affect the position of a Null based on multiple Checkbox Controls?
if (thisComp.layer("Total Diamonds").effect("8")("Checkbox") ==1) [799.4,70.0] else [741.7,70.0];
if (thisComp.layer("Total Diamonds").effect("7")("Checkbox") ==1) [856.7,70.0] else [741.7,70.0];
if (thisComp.layer("Total Diamonds").effect("6")("Checkbox") ==1) [914.5,70.0] else [741.7,70.0];
if (thisComp.layer("Total Diamonds").effect("5")("Checkbox") ==1) [972.0,70.0] else [741.7,70.0];
if (thisComp.layer("Total Diamonds").effect("4")("Checkbox") ==1) [1029.7,70.0] else [741.7,70.0];
if (thisComp.layer("Total Diamonds").effect("3")("Checkbox") ==1) [1087.2,70.0] else [741.7,70.0];