-
Randomize numbers between 1 and 9. Stops at Marker with comment
Hi there.
I’m doing a charity event were I want the total amount gotten to count up.
I don’t want to animate the text because it’s linked in Element 3D. And would like to keep it to 1 layer.
So i’ve tried doing it with an expression.The text randomizes between 0 and 9. When it hits a marker with a comment, the text changes to the markers comment.
This works for the 2D text. But in the Element 3D layer, after it hits the marker it still keeps randomizing.Is there another possibility to do this?
Cheers.
Huub
m = thisComp.layer("CIJFER 1");
n=0;
if (m.marker.numKeys > 0){
n = m.marker.nearestKey(time).index;
if (m.marker.key(n).time > time) n--;
}if (n >0) {
m.marker.key(n).comment
}else{
Math.round(random(0,9));
}