Hi! I would like to make different shapes to be driven by the same nulls using the ".valueAtTime(time-x)" expression.
Where should i use the time offset value in the path expression?
I used it in anchorPoint.value but i get no delay. The shape look the same like the one without it.
Let's say i have this expression on a path driven by 10 nulls:
var nullLayerNames = ["Shape Layer 1: Path 1 [1.1.0]","Shape Layer 1: Path 1 [1.1.1]","Shape Layer 1: Path 1 [1.1.2]","Shape Layer 1: Path 1 [1.1.3]","Shape Layer 1: Path 1 [1.1.4]","Shape Layer 1: Path 1 [1.1.5]","Shape Layer 1: Path 1 [1.1.6]","Shape Layer 1: Path 1 [1.1.7]","Shape Layer 1: Path 1 [1.1.8]","Shape Layer 1: Path 1 [1.1.9]","Shape Layer 1: Path 1 [1.1.10]"];
var origPath = thisProperty;
var origPoints = origPath.points();
var origInTang = origPath.inTangents();
var origOutTang = origPath.outTangents();
var getNullLayers = [];
for (var i = 0; i < nullLayerNames.length; i++){
try{
getNullLayers.push(effect(nullLayerNames[i])("ADBE Layer Control-0001"));
} catch(err) {
getNullLayers.push(null);
}}
for (var i = 0; i < getNullLayers.length; i++){
if (getNullLayers[i] != null && getNullLayers[i].index != thisLayer.index){
origPoints[i] = fromCompToSurface(getNullLayers[i].toComp(getNullLayers[i].anchorPoint.valueAtTime(time-. 16)));
}}
createPath(origPoints,origInTang,origOutTang,origPath.isClosed());