-
Get the time value when a variable changes.
Hi first of all excuse me for my english it is not my native tongue.
The expression I pasted below must be applied to the time remap property. so you can trigger the animation with this expression.
I have two problems with this expression, the first one is im using an IF to trigger the animation, but the object called ELEMENT passes through the sampling area in about 10 frames, then leaves it, and the alpha variable goes back to a value of 0, and so the IF changes and the animation get stopped. Is there a way to keep the animation going?.
second problem, once the IF starts I use TIME to control a LINEAR, but the value of TIME is the value of the composition´s time, and I need to generate a variable that stores the TIME minus the time at the moment the IF changed and triggered the animation. Is there a way to accomplish this?Thank you very much!
var alpha=thisComp.layer("ELEMENT").sampleImage(thisComp.layer("LAYERBASE").transform.position,[300,300])[3];
if(alpha>0){
linear(time,0,120,key(1),key(2))}Matz