Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[UMG] How to animate text like it's being typed out?

Hi, I'm currently using UMG to create my subtitle/NPC dialogue system.

For now, my block of text simply fades in and out, but I was wondering if there's any way to animate my text widget so that the contents look like they're getting typed out? There is no need for the blinking underscore behind it, but i just want it to roll out naturally instead of showing a giant block of text right away.

Any help, demos or guidance is appreciated. Thanks!

Product Version: UE 4.9
more ▼

asked Oct 16 '15 at 08:24 PM in Blueprint Scripting

avatar image

49 6 7 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Here is the basics: Take your Completed string, pass it into a For Loop(last index determined by passing the completed string into LEN, first index is just 0) The loop should contain: LEFT(your completed string feeds into this, also the "Index" from the for loop feeds into it) and then a pause of 0.1 seconds or similar. effectively each time around the loop it adds one more letter to the length of the output string. This should be responsible for updating the UMG widget variable that feeds on screen display. in the completed part of the for loop, i'd add a delay of a second or so, and then remove the UMG widget.

more ▼

answered Oct 16 '15 at 10:12 PM

avatar image

986 34 3 41

avatar image fishbone94 Oct 16 '15 at 11:25 PM

Thanks! that makes a lot of sense and helped me greatly. However, I've run into a problem as my string still prints as one sentence instantly. I put a print string at the end of every loop for debug, and realized that it was only called once with the whole string printed.

alt text

avatar image MrGrr Oct 21 '15 at 10:17 AM

hmmm. maybe i'm being stupid with the for loop, it seemed the most logical. after a bit of checking the for loop runs through all iterations in the space of one tick. which explains what you are seeing.

this isn't a problem, it just makes things a little more interesting. similar approach, just varied slightly. it would need to be done using event tick and a series of variables for doing making your own for loop. like set textindex=0, (do the len, left stuff here) then set textindex=1, delay 0.1 (event tick will obey this delay) and repeat - you will need a variable to store the string length and compare textindex to it.

if anyone else has an idea, let me know :P

avatar image fishbone94 Oct 21 '15 at 04:53 PM

Yep, turns out a manual loop does the trick. Thanks! :)

avatar image Snoxx Aug 05 '18 at 03:11 AM

If anyone has done this recently. Can you please post up some screenshots of how. I need this too but this post didnt help me much because im new to this stuff :P I need your help, thanks

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question