I’m attempting to replicate the typewriter text in the last animation using expression and I’m having a bit of trouble. I have two Text nodes. One with the original text and another Text node with the following expression:
originalText = original.text.get()
output = " "
while frame < len(originalText):
output=output+originalText[frame]
ret = output
And in the python console I have this
ERROR: while executing script:
ret = app1.new.text.expression0(15,0)
Python error:
Python exception: local variable 'ret' referenced before assignment
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 22 in expression0
UnboundLocalError: local variable 'ret' referenced before assignment
I tried it in Python3 (swapped out frame for a counter) and it worked.