Animation nodes loop text problem
I am assuming you want to maintain a uniform typing speed across texts. In which case, we can assign a weight to each text based some other factor. This weight act as a duration multiplier to maintain a uniform typing animation. In this case, I will choose the length of the text as the weight. Next, I will compute a list that represents the starting times of each animation based on the weights we just computed. This can be done using a simple loop as follows:



The padding is just a constant added to pad the duration allowing for holding the animation for some time. Next, we want to know, at any time, which text are we typing. To do that we use the following numpy expression:

numpy.argmax(sums.asNumpyArray() &gt; frame) - 1


It basically gets the index of the first element in the sums list that is larger than the current frame.



Make sure to import numpy in the Advanced Node Settings of the Expression node. Next, we get the text and its starting time at the output index, we subtract the its starting time from the time and use that as the end trim value as follows:



Now, lets divide the time to slow it down a bit and see what the result:



Increasing the padding will increase the interval between the starting animation of each text. The fading effect can be created just as we did, so I will let you do that on your own.