What I usually do in situations like this is create a widget, and give it several variables relating to how it could possibly be set up (e.g. a Texture2D reference for the image of the speaking character, a text variable for the name of that character, a text variable that includes the actual text of the bubble, a bool for whether the face should appear to the left or the right of the text itself, etc.)
Then I’d set up a Custom Event in the widget called “Pass In Dialogue”. I would give it inputs that correspond to all my variables I just made above, and configure it to Set those variables to its input values whenever called.
Now, whenever I want to generate dialogue (via the level BP, some NPC’s BP, whatever) I call Create Widget with the class being my Dialogue Widget. I then immediately grab the output of that (the widget referece) and call Pass In Dialogue to send it all of the relevant info regarding this piece of dialogue. Then, Add to Viewport.
I would suggest finding a way to have removing itself from the viewport be something included in the dialog box itself (e.g. when the player presses a button or whatever)
For roll-out text, you are doing it the SUUUUUPER complicated way. Here’s a far simpler way: Create a Timer, set it to Loop, and give it a time near 0.25 s or so. That Timer should simply increment an Int variable by +1 (we’ll call it TextProgress) Call it to start whenever the dialogue widget is created.
In the Get Text function of the actual text box in the widget itself, rather than just reading the Pass In Dialogue text variable, it should take that variable, convert it to a string, run a Left Chop on that string (using TextProgress to feed the Int), then convert it back to Text to display it (note: since this is purely cosmetic, losing the Text localiization is okay, we’d just need to handle localization BEFORE doing this roll-out effect).
Now, every 0.25 seconds, your passed in string will get one character longer. You can obviously speed this up if you like. The timer can also do other things like play a tiny sound cue for each added letter (pretty common effect). It can handle playback adjustments too: whenever a key is pressed, you retrigger the timer at 0.1s looping (or whatever) and then back to 0.25 when that key is released.
You can also check the Int of TextProgress against a Len called on the initial Text variable (converted to string, of course) to see how close you are to the END of the text… At which point you can branch the behavior of the text speedup button to destroy the dialogue box, go to the next page, whatever.