<div>It sounds like maybe you’re after something very different than what I posted. This is a version that should run your time remapped comp animation as long as the text is “On”, hold the last value when the text goes “Off”, and start again (not from zero, but from the held time) if it goes “On” again:</div>
txt = thisComp.layer("Text").text.sourceText;
n = 0;
for (f = 0; f < timeToFrames(time); f++){
if (txt.valueAtTime(framesToTime(f)) == "On"){
n++;
}
}
framesToTime(n);
>I don’t know if it’s uncouth to post my own renamed and commented version of your script on here?
Not an issue.