1
$\begingroup$

I know how to input text with animation nodes and make it appear randomly and typed, but I can not figure this out with a text block reader. Is there a way to use say 5 paragraphs from a text block, and have the letters all randomize in the text block. Currently when I use the text block and get length, it does not include the line breaks so It is one long line on its own.

enter image description here

So these 1's and 0's are all randomly generated, but say I want a line break every 38 characters, I can not figure out how to get that without having individual text input for every line.

enter image description here

I would like the text block to look like this but have all the 1's and 0's randomly genereate continually.

$\endgroup$
3
  • $\begingroup$ Have you tried looping over the characters, and if they aren't a newline, replace them with a random characters? To check if a character is a newline, you can compare the character with the Line Break output of the Characters node. $\endgroup$
    – Omar Emara
    Commented Aug 20, 2019 at 16:25
  • $\begingroup$ Hi Omar, I do not fully understand how loops work yet, I have toyed with the compare node, but I do not understand what you were talking about. If I created a loop, what nodes would I have to use within it, would it be a text list iterator, and then the compare node somewhere in there? $\endgroup$ Commented Aug 20, 2019 at 17:15
  • $\begingroup$ or do I have to create random text for every line of roughly 38 characters, and separate it with a line break in a list? $\endgroup$ Commented Aug 20, 2019 at 17:21

1 Answer 1

1
$\begingroup$

You can generate lines individually then join them using a line break as follow:

Node Tree

$\endgroup$
1
  • $\begingroup$ So this works great for creating random lines of text. I successfully added a frame node, connected to a float math node (divide) bottom value set to one, connected to the seed of random text, so each character randomly changes on each frame. Then connected that to another random text character slot. And connected that 2nd random text nodes into the loop. I was able to successfully generate a random character for every character on every line of text. Thank you $\endgroup$ Commented Aug 22, 2019 at 15:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .