-
Text writes on after it changes via markers on the comp
I’m using the expression below to have a long text change each time a marker is passed, the text is written in each marker comment.
In the same layer I have a text animator that writes the text on, much like the typewriter preset, but also driven with by an expression (expression below).
The problem is the text only writes on at the very beginning and after it only changes to what the marker has in it but without any animation
Is there a way to have it write on each time it changes without having to create different layers for it? The expression that writes on does it based on the in point of the layer.
Thanks in advance.
txt = value;
n = 0;
if (thisComp.marker.numKeys > 0){n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
if (n > 0) txt = thisComp.marker.key(n).comment;
}
txt;
--------topVal=100
fadeDur = thisComp.layer("xp").effect("fadeDur")("Slider");
if (time < (inPoint+outPoint)/2)
ease(time,inPoint,inPoint+fadeDur,0,topVal)
else
ease(time,outPoint-fadeDur,outPoint,topVal,0)