Hey Alex, thanks very much!
So the animation triggers once x == y. It doesn’t matter if it goes higher, because it’s already played the animation.
Basically I’m making a template where the bottom line of text is underlined by a shape layer which stretches to fit it depending on how many characters there are.
I’ve used split() to output the last line into a new layer which is used by the shape layer via sourceRectAtTime.
The last issue is the type on – i need the last line’s type on animation to trigger once the rest of the text has finished typing on.
So the when (time) the amount of characters in the type on reveal (x) matches the amount of characters in the source text it’s revealing (y), the type on of the last line is triggered.
Hope that makes sense! It’s been so convoluted to get it to this point, I can’t give up now… have learned a lot about expressions in the process though ☺
I tried your inline expression by the way, it just seems to flash the first letter of the last line once x == y.