Show continue button only at the end of a dialogue node

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Jorillan
Posts: 12
Joined: Fri Nov 24, 2023 6:57 am

Show continue button only at the end of a dialogue node

Post by Jorillan »

I have an option in my game where you can set the continue button on and off for those players that need more time for reading. I got everything set up already but I cannot make the continue button to appears only at the end of a conversation node. I've read these other posts related to the topic:

https://www.pixelcrushers.com/phpbb/vie ... php?t=3862

https://www.pixelcrushers.com/phpbb/vie ... f=3&t=3028

What I want to achieve is similar to what you get with the typewriter approach (2º link) but I don´t want the typewriter effect. My game´s dialogues are like the old point and click adventure games where you get the entire dialogue from a character at once, you read it through and the next conversant continues with the conversation.

I have audios in my dialogues nodes. So what I´d love to get is the continue button ither appears at the end of the audios or at the end of the time set up for reading the node ( Subtitle chars per second ).

It would be great to have a Strat and End event for the each node based on the audio dialogues or the Subtitle chars per second so It would be possible to able and disable the button there.

Any help? ;)
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show continue button only at the end of a dialogue node

Post by Tony Li »

Hi,

If all dialogue entries have audio, use this sequence:

Code: Select all

SetContinueMode(false);
AudioWait(entrytag)->Message(PlayedAudio);
SetContinueMode(true)@Message(PlayedAudio)
You can set this in the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Default Sequence and then leave the individual dialogue entry nodes' Sequence fields blank.

The first line hides the continue button.

The second line plays the audio clip associated with the dialogue entry's entrytag. When it's done, it sends the message "PlayedAudio" to the sequencer.

The third line waits for the sequencer to receive the message "PlayedAudio". Then it shows the continue button.

If a dialogue entry doesn't have audio, the AudioWait() command will end immediately. If you don't want this to happen, you can change the sequence to:

Code: Select all

SetContinueMode(false);
AudioWait(entrytag)->Message(PlayedAudio);
Delay({{end}})->Message(Delayed);
WaitForMessage(PlayedAudio,Delayed)->Message(AllDone);
SetContinueMode(true)@Message(AllDone)
In this sequence, the third line delays for a duration based on the text length. Then it sends the sequencer message "Delayed".

The fourth line waits for the messages "PlayedAudio" and "Delayed". When it has received both messages, it sends the message "AllDone".

The final line waits for the message "AllDone". Then it shows the continue button.
Jorillan
Posts: 12
Joined: Fri Nov 24, 2023 6:57 am

Re: Show continue button only at the end of a dialogue node

Post by Jorillan »

Hi Tony,

Thank you for the reply. Unfortunately I couldn't make it work. I entered the code lines in the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Default Sequence and in the nodes' Sequence but The continue button still there at the start of each conversation node. I'm using a "Bubble Template Standard UI Subtitle Panel" for PC and NPCs instead of the panels of the "Basic Standard Dialogue UI" I have for the Response Menu Panel. I don´t know if that affects anything.

Here are some screenshots of my settings. They might help.
Attachments
Screenshot_02.jpg
Screenshot_02.jpg (109.82 KiB) Viewed 746 times
Screenshot_03.jpg
Screenshot_03.jpg (115.76 KiB) Viewed 746 times
I entered the second option you provided me. It just doesn´t show it all here.
I entered the second option you provided me. It just doesn´t show it all here.
Screenshot_01.jpg (190.6 KiB) Viewed 746 times
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show continue button only at the end of a dialogue node

Post by Tony Li »

Hi,

Since your dialogue entry's Sequence field has commands in it, the dialogue entry will run those commands instead of the Dialogue Manager's Default Sequence.

Let's first test that one dialogue entry. Inspect it and set the Sequence to:

Code: Select all

SetContinueMode(false);
AudioWait(Voice Audios/ConversationTest/ConversationTest_NPC_HelloThere)->Message(PlayedAudio);
SetContinueMode(true)@Message(PlayedAudio)
If that works, then we know the process is correct. However, you can imagine that this would be tedious to enter for every dialogue entry. That's why I recommend leaving the Sequence field blank and using entrytags. See part 4 of the Cutscene Sequence Tutorials for an explanation of entrytags.
Jorillan
Posts: 12
Joined: Fri Nov 24, 2023 6:57 am

Re: Show continue button only at the end of a dialogue node

Post by Jorillan »

Hi Tony, I tested that particular dialogue node with the code you provided me and worked perfect. Thank you.

I watched the Entrytag tutorial and set up the first 8 nodes of my conversation with entrytag and entered the code you provided me in the first reply in the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Default Sequence. It seems to work fine with the NPC but the player´s Continue Button is always visible and active. Both NPC and Player have the Sequence field blank. I can see how dynamically changes the Continue Button Options in the Dialogue Manager Subtitle Setting from "Never" to "Always". That works for both the NPC and the Player but the player´s button is active even when the Continue Button option is set to "Never". The NPC Continue Button sometimes also set to active after a player node (Player´s button was active).

I also copy the code in the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Default Player Sequence but the player´s button still shows up.

I also noticed that the audios with the Entrytag naming has to be directly under the Resources folder. Is it possible to organize the audios in different folders within the resources folder?
Jorillan
Posts: 12
Joined: Fri Nov 24, 2023 6:57 am

Re: Show continue button only at the end of a dialogue node

Post by Jorillan »

I tried adding to the first four node´s "Sequence" the audio code along with the addition code to set ContinueMode to False. That worked fine just with one node but it seems to fail with a sequence of nodes of different characters. The Continue Button keeps shown randomly in Player and NPC.
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show continue button only at the end of a dialogue node

Post by Tony Li »

Hi,

Does each subtitle panel have its own continue button? Or does your dialogue UI have a single continue button that all subtitle panels point to?

On your Dialogue Manager GameObject, what are your Display Settings > Subtitle Settings set to?

Try setting Display Settings > Camera & Cutscene Settings > Default Player Sequence to the same as Default Sequence. If this doesn't do what you want, clear Default Player Sequence again. (I don't know your Subtitle Settings, so I can't say yet whether this is what you want.)

It's possible to put audio files in subfolders inside Resources, but I recommend using multiple Resources folders instead, such as:

Assets/Voice Audios/NPCs/Adam/Resources/Adam_1_2.wav
Assets/Voice Audios/NPCs/Adam/Resources/Adam_1_4.wav
Assets/Voice Audios/NPCs/Adam/Resources/Adam_1_7.wav
Assets/Voice Audios/NPCs/Bob/Resources/Bob_1_1.wav
Assets/Voice Audios/NPCs/Bob/Resources/Bob_1_3.wav
Assets/Voice Audios/NPCs/Bob/Resources/Bob_1_5.wav
etc.
Jorillan
Posts: 12
Joined: Fri Nov 24, 2023 6:57 am

Re: Show continue button only at the end of a dialogue node

Post by Jorillan »

Hi,

yes I have one continue button for each character. It is attached to the right side of each panel.
Screenshot_00.jpg
Screenshot_00.jpg (371.75 KiB) Viewed 724 times
Screenshot_01.jpg
Screenshot_01.jpg (364.59 KiB) Viewed 724 times
I tried setting Display Settings > Camera & Cutscene Settings > Default Player Sequence to the same as Default Sequence but the buttons, after the first node, keep showing up for both the Player and the NPC beside the fact that in Dialogue Manager Continue Button options changes from Never to Always when the audios start and end, so that works.

This are my Dialogue Manager Display Settings > Subtitle Settings.
Screenshot_02.jpg
Screenshot_02.jpg (203.64 KiB) Viewed 724 times
And the Bubble Template Standard UI Subtitle Panel for each character.
Screenshot_03.jpg
Screenshot_03.jpg (115.67 KiB) Viewed 724 times
I'll try using a single continue button for all the character and see if that works.
Jorillan
Posts: 12
Joined: Fri Nov 24, 2023 6:57 am

Re: Show continue button only at the end of a dialogue node

Post by Jorillan »

Hi Tony.

I tried with one single Continue Button for all the characters and it works perfect. The problem seems to be related to having a button for each character. Is it possible to have that set up?. I'm using one single Continue Button for now and wait to see if there's a solution for this.

The only thing I noticed is when the conversation ends the Continue Button Option in Dialogue Manager stays set to Always. Same as when after an NPC node follows a response node, it stays Always until I pick one of the response options and the Player start talking.

Thank you for all your feedbacks.
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show continue button only at the end of a dialogue node

Post by Tony Li »

If you're using overhead subtitle panels, is only one panel visible at a time? If so, I don't understand how the other character's continue button can be active.

Would it be possible to send a reproduction project to tony (at) pixelcrushers.com or steps to create a scenario that has the same issue?
Post Reply