-
combine 2 expressions
so this is a combo of something i was asking about yesterday
I am being asked to make the objects bounce up and down once when they change color using the 2nd expression below which is in the color parameter of a fill effect, referencing a marker on a null.
the problem is I already have the objects dropping in with the drop script below. I wonder if there is a way to add a variable, that changes the y value in the drop script so that the objects reference a new slider animation with the same delay and timing they are being effected by on the color script?
does that make sense?
//drop script
t=time-inPoint;
N=thisComp.layer(“dropper”);
dropper=thisComp.layer(“dropper”).effect(“drop”)(“Slider”).valueAtTime(N.inPoint+t);
***b= thisComp.layer(“dropper”).effect(“bounce”)(“Slider”).valueAtTime(N.inPoint+t);
d=(value[1]-dropper)-b;
[value[0],d,value[2]]*** i added this but started thinking, it should be similar to the color script
//color script
L= thisComp.layer(“marker null”);
delay = thisComp.layer(“dropper”).effect(“color delay controller “)(“Slider”);
result = value;
if (L.marker.numKeys > 0) {
t = L.marker.key(1).time;
if (time >= t) {
if(Math.floor((time-t)/delay) + 1>= index){
result = [1,0,0,1];
}
}
}
result