0
$\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$
  • $\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 Aug 20 '19 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$ – Nick Sieben Aug 20 '19 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$ – Nick Sieben Aug 20 '19 at 17:21
0
$\begingroup$

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

Node Tree

$\endgroup$
  • $\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$ – Nick Sieben Aug 22 '19 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.