-
trying to run time mapped animation when null object position changes
Hey all,
I have a 6 frame animation within a time remapped layer named “Blue” that I’m trying to run one time every time a null object changes position.I have the time remap attached to a slider and I have the Null object keyframes set to “Hold” so the position only changes on a new keyframe.
With my weak knowledge of expressions and sliders, this is what I’ve come up with so far:
n1 = thisComp.layer("Null 1");
thisframe = n1.position.valueAtTime(time);
prevframe = n1.position.valueAtTime(time - thisComp.frameDuration);if (thisframe != prevframe) {
[ go to frame 1 of "Blue" and run 6 frames ]
}
My two issue:
1.) I haven’t been able to find how to tell “Blue” to go to frame 1 and run 6 frames and then stop. Is this a loopin expression?2.) Despite both “thisframe” and “prevframe” displaying the correct values, my if statement does not work when tested.
Any tips or advice would be greatly appreciated!
Best,
G