'Next' button in widget to progress dialogue

Hi,

This is my last request for help for the night I promise, I have a working widget that is essentially a chatbox from the NPC.

Its current buttons can currently ‘Travel’ which initiates to load another level and it can also ‘Leave’ which exits the chat widget. I now want it so that when I press this ‘Next’ button the widget text changes. I’m not sure how to do this.

Is the text back in the actor that created the UI widget?

The text is only in the ‘Content’ details section of the [TalkText] “Hello Adventurer!” not sure where to create this text properly so it can cycle, creating it in the ‘Content’ part of a text label seems odd (it was from a YouTube video, generally not best practice I’ve found)

Assuming you mean this:

Try this:

Essentially, the Next button executes the already existing script.

  • the text array could be in the character that does the talking (what you have now I presume)
  • it could be inside the widget itself (and the array can be repopulated to display another dialogue)
  • it could sit in a Data Table if you have a lot of text, the widget could fetch a conversation from there
  • you could have a dedicated conversation manager actor that controls what conversations have taken place and who talks to whom, and what gets said, where in the story we are and so on

Depends on the scope.

Only problem so far is that it doesn’t know what ‘Talk’ is, is this suppose to be [TalkText] “Hello Adventurer” from the dialogue widget? I’m not sure how to reference it

It’s called Event Talk here: (the event bit probably comes from the interface):


Stuff in green is already hooked up:

Okay, this works now, but it also breaks being able to open the chat widget again a second time

Can we see the whole thing? You can copy paste all relevant graph nodes here:

Create a BP and post link, for example:


Nodes are just plain text so you can copy paste them in and out. More manageable than screenshots for huge graph.

Fantastic idea! had no idea I could do that.

W_Dialogue BP (widget button event bp)

bp_Travel_NPC (npc used to chat and travel)

bp_franklin (main player controller bp)

Wouldn’t mind being able to have the ‘Travel’ button only appear on the second line of text after clicking ‘Next’ so it’s more context relevant

So, the next button scrubs through the conversation just fine but the Interface no longer triggers? Nothing seems to be wrong with it atm.

Wouldn’t mind being able to have the ‘Travel’ button only appear on the second line of text after clicking ‘Next’ so it’s more context relevant

Or keep the button hidden by default and show it:

Plugged some place here probably:

Duh. My bad. The input mode is set to UI only so the player controller can no longer trigger talking - assuming you mash keys to trigger the interface. Reset the input mode once the widget closes.

So Reset looks like this?

Eh? I swear officer, I never seen that node in my life… :rotating_light:


By “reset” I meant switch the input mode back to what it was. Presumably Game and UI - when the widget goes away. When you’re in UI only, the player controller has no clue what is going on.

1 Like

I have no idea what is happening but I can open the dialogue again, even without that ‘Reset’ thing, it even resets the conversation properly, I must have been really drunk or I didn’t compile something.

So I changed it to Game and UI, just because it works easier this way but for some reason it can’t get rid of the cursor when the dialogue ends, I thought the below would work but it doesn’t

What input mode do you run by default? Do you know which mode you need when running around with a sword and when engaged in a conversation? Does it matter?

By default it would be game mode only

this is what I currently have, it’s just the cursor that doesn’t disappear again that I want

Re; travel button on first text, it disappears on the second text, no matter what I change the number too, if it isn’t 2 it shows it anyway

Then it’s this, revert to Game Only as mentioned above.

It’s quite common to open a widget → UI only; close widget → Game only.

Sorry I’m a bit lost, where do I put game only mode to fix it?

Add widget to viewport → UI only
Remove from viewport → Game only


For the setup discussed above, I’d probably:


There maybe be an exception to catch somewhere else in the code in case the widget is removed in some other way. So we’re not stuck in UI mode.