Here's how I have my dialog set up

Here’s the phil bug in question…

Here’s my question. How Do I Get my text block dialog widgets to go into a shuffle mode and then display just one widget from out of the shuffle?. When i can do that, my npc’s will beable to have their own little opinions and sayings in the game to respond back with.
I want to shuffle the dialog widgets.

I know the Audio has got a Random Option to allow you to connect audio sounds
samples to the main speaker node and then shuffle them. BUT I need to get Unreal to do the same thing with widget text blocks… And in the Widget text Designer there’s no RANDOM OPTION I can see of to allow me to do this. The Sequencer node does not have a Random Checkbox also on it. If it did, that would make things whole lot more easier for me.

This is how I set it up NOT for a shuffle but for just your normal sequenced one after another follow through Dialog. I HAVEN"T yet got cutscenes in yet, so you can roam around while the dialog is displaying. It just displays one widget at a time one after another as part of a conversation. Don’t worry about the double copy of text in the comments section, can be fixed later.

Now this is what I want Unreal to do.

For some of the dialog on my game, I want Unreal to also shuffle around the Widgets nodes and then play back one of the nodes to allow the NPCs in the game to be spontaneous.

I need to find a node other than the sequencer that will allow me to Randomize the Output so it fires off any one of those four nodes and then display the text block widget for it. So Unreal will shuffle the three nodes at random and then pick a node to execute.

When one of the nodes is executed, The text will display and also play the audio file as I have put the sequencers in to allow sound to play with the dialog.

Does anyone here know how to set this up so my widget nodes can beable to fire off at random? It will display just one widget out of the group when it fires it at random.

No need to shuffle text blocks, just pick a random entry in an array and set widget’s variable:


Ah, so you have to assign an variable or string text variable on the Widget to tag it so the string array index can then beable to sort it… Ok so How do I connect this string text array up in my code above? I don’t see any EXEC pins for me to connect the array up to, and this is a purple pin array, and on my on overlap trigger there’s no purple pins for me to
connect the array up to.

Ok so sorting at random. it picks one in the index, and then does Unreal just display the widget for us automatically in the hud for us? or do we have to force unreal to want to
display it up on the hud?

If it displays it automatically up for us great, problem solved, but if not then I need to see this string array linked up into my own code in the screenshot example above because I’m not sure yet where the string array goes or what node I need to connect the array up to
so the overlap trigger can beable to use the array.

I do like this string text idea using an ID system for the widgets but what about the Audio?, we need the audio dialog to also be played along with the text as well when it sorts the string index containing the widget ID tags.

Here’s the most basic setup:

Create a string variable (TextToDisplay) in your widget and bind it to the text block:


Set the widget’s variable to a random piece of text pulled from an array:


There’s more than one way to send data to a widget:

When it comes to something more complicated (including audio), you will need to set up a DataTable. Judging by what little I can read from the low resolution images you attached, that’s not the right way to do it. It seems you are doing it manually one by one, you should find a way to automate it, at least a little. Have one widget and just pull and display the relevant piece of data from a database. The thread with the example is here.

There are some clever plugins that manage complex branching dialogues:

I watched the Data Table Video link you gave me to try to clear some things up, can you please show me whats in that widget textblock binding so i can see the code to see how you are getting the widget to read the text from the string array or the data table because I been looking at your links to try to figure this all out because I’m sure something has to go in the binding and I realize now I have to put in all my game values in a data struct table to turn them all into data variables for Unreal to use because I have 66 pages of set data to enter in… I also realize I will also need to create data structs tables for all for my systems and planets, all my enemies, all the loot drops, weather patterns on the planets, all the level progression table ect and also the types of weapons. .

I need to see what’s inside of that textblock binding.

I also have to put the dialog of my party members all in separate text data tables because the game has got alot of dialog, because it covers over many worlds and systems, I know how to create the Dialog Fields Data Struct table as you already shown me the screenshot to that so I can see what variables type are being used for doing the fields. But I do also need the Audio ID Field, Audio File to beable to play the audio
using the row number by reading the dialog text data table might be the way to do it.

I’m not sure how you integrated that dialog struct table as part of the editor to allow you to then edit the fields.

So do I just connect the on overlap trigger now to your set node? I couldn’t enter this type of set up into the textblock binding blueprint area because not all the nodes would show up in the list, and that’s why i need to see whats inside that textblock binding bit so I can build the code for the widget.

It looks like your string array has to go maybe in the blueprint that contains my on overlap trigger because then all the nodes will then show up because I want the dialog to start up in the game only when you walk up close to the npc when you enter into their trigger hotspot area.

Now should this string array go in the Con’structs part of the blueprint or just in the event Graph? Because I need it to work with the On Overlap Trigger.

Your string widget text array will not work unless I know how to build also that textblock binding function code. Does someone in here know how to build the Textblock Binding Function to make this string array blueprint work ??