-
Delaying a loop at its extremes.
Apologies in advance, but I’m terrible at expressions and this is all cobbled together from reading these and other forums.
I have a line of text which periodically swaps its Source Text randomly with a word from a list. (Taken from here: https://provideocoalition.com/pvcexclusive/story/expression_shorts_-_random_words_cycle)
This swap is hidden behind an animated Character Offset. The property itself has a wiggle applied to it (in order to constantly cycle characters) then the Offset property of the Range Selector that governs the Character Offset is animated by the following expression:
//(6.2 is just a trial and error value that seems to align the loop cycle with the swapping text.)
period = thisComp.layer(“EXP CONTROL”).effect(“Slider Control”)(“Slider”)/6.2;
t = time;
50*(1 – Math.cos(t / period ))(This is taken from a reply Dan gave on making a linear loop: https://forums.creativecow.net/thread/227/13047#13054)
The only issue is that the loop only ping-pong’s between 0 and 100 and only fully reveals the correct text for one frame. What I need is for once 100 is reached there be a delay before beginning to animate back to 0. Unfortunately I have no idea how to do this.