Is there a simple way of making text enter the screen in a typewriter style? I mean, like many games do, having each letter of a sentence made visible slowly. So like a string “Hello”, would display the ‘H’ first, then the ‘e’ and so on.
I’ve tried Googling terms like “ue4 typewriter text” and so on, but cant seem to find anything.
Obviously, I can do this manually, setting a delay for each letter, but that would take weeks! Hoping to just send a string to the HUD and have it ‘type’ it out.
This can be done relatively simply. Probably not with the default Print String node, as I think that each Print String begins on a new line. Therefore, if you were to run a loop over a string and have it print each letter after a delay, what you would get is a bunch of letters each on a new line, which I assume you don’t want.
If you set up a UI with a message system (ie, appending TextBlocks as children to a chat window will achieve this affect), I’m certain you can edit individual TextBlocks instead of adding new ones every time. This way, you can set up your own custom TypeWriter_Print function, for example, which takes a string as a parameter. In the function, have it (at the start) append a TextBlock to your chat window (this will be our new line). Now, we can iterate over the string, appending each letter to the end of our new text block (after your desired delay).
Then you should be able to just call your custom function with a string, and it’ll create a new line in your chat box, and slowly start appending each letter of the string to your new line of text.
This looks good, but can you please explain how you got the Text Render node to plug into the Target of the Set Text, and what part is actually being sent to a widget?