Hello wonderful people!
A problem solving mind needed here... I have expired the use of mine...
AIM:
To create a text animation sequence (for character dialogue) with a style that types into place letter by letter and then opacity fades, then repeats several times with different text objects - using animation nodes.
PROPOSED METHOD:
To have several text objects in a list, which will cycle through in an animation sequence as follows: Text object one will appear letter by letter as if being typed into place, then it will hold for a second and fade out. Then text object one will move out of place and in its place text object two will be placed, then it will animate in the same way - type into designated area, then hold for a second then fade, then for the remaining text objects.
THE STORY SO FAR...
I created 3 text objects, put them in a list and have a repeated time of 70 frames, during which the text is trimmed to give typing effect. I created some math and logic to give us a signal when the repeat cycle is complete, so that when 70 frames is up, a 1 is given which could then trigger the next text object in the list, but I am not sure how to change the index of the text object list to the next in the sequence...
Please see the screenshot of the nodes setup and the blender 2.8 .blend file is also attached.
blend file:
SOLUTION (Omar Ahmad):
Create a new loop with an iterator of type ‘integer list’ named integer. Add two parameters of type ‘integer’ named sum and padding. In loop node’s N menu, in Advanced Node settings, Add a generator of type ‘integer list’. In the loop node’s N menu add a ‘reassign parameter’ node for the sum parameter socket. Create a text list with text objects populated… Create expression node with numpy statement. In the expression Nodes N menu, under Advanced Node settings, insert the module numpy, by comma separating to add it to the current module, so that it reads math,numpy. Add an input of type ‘integer list’ named sums and an input of type ‘integer’ named frame. Add a get list element which receives the text list, and has an index as the result of the expression node, which makes its calculation based on the frame in ‘time info’ and the integer list of the invoke subprogram node for the recursive sum loop.
current frame minus the numpy expression. math result in to trim text end, to give the amout of text trimming. then the text selected list goes in to the text input of the trim node.
The integer list of the recursive sum loop is received from the text length node, which outputs a list of integers, which are the character lengths of each text item in the text list.
The sum integer gives a delay before the text animates. The padding integer gives a delay between each item list animation.