I'm trying to create a null that will move between two points based on a percent complete slider. This null will move hundreds of other layers. All of those layers will start at a set point and end near a set point based on whatever random number is given to them.
I don't want to use the expressions, start at x time and end at y time because I want to be able to animate back and forth.
My null animates from 0 to 100 over 2 seconds.
My Start value is set to 0. This should mean all of my layers start at 0 on the Z axis.
My "End value" is set to 2000. Meaning I want them to travel roughly 2000 on the Z.
I have a random Z movement slider set to 500. Meaning I want the hundreds of layers to end +- 500 from what my "End Value" is. All of the hundreds of layers should move at independently from each other, in other words I don't want them all to end at the same z depth.
I have put the expression below onto a few of the hundreds of layers position to test it out. I can't get the tStart or tEnd to start and stop on the % complete keyframes from my null. I thought if I was able to tell it, when cT equals 0 on the slider, then Start moving the layers. When cT equals 100 on the slider, then Stop moving the layers.
Floor Controls (Null Sliders)
% Complete: 0 to 100 slider (this is where my key frame animation would be)
Starting Z Depth: 0
Z Depth: 2000
Random Z Movement: 500
zRandom=thisComp.layer("Floor Controls").effect("Random Z Movement")("Slider");
cT=thisComp.layer("Floor Controls").effect("% Complete")("Slider")/100;
StartVal=thisComp.layer("Floor Controls").effect("Starting Z Depth")("Slider");
EndVal=thisComp.layer("Floor Controls").effect("Z Depth")("Slider")+random(zRandom);
z = ease(time,tStart,tEnd,StartVal,EndVal);
value + [0,0,z]