Problem with executing sequences at the end of conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
MasterDavicous
Posts: 8
Joined: Mon Apr 10, 2023 12:42 pm

Problem with executing sequences at the end of conversation

Post by MasterDavicous »

Hello,
In my game I would like to have it so on the final node of conversation, the player will press the Continue button in order to finish the conversation and close the Dialogue UI. Once this has happened, I would like to play a set of sequences, such as for showing an alert and the quest tracker UI. The problem I am facing is either the sequences play while the last dialogue node is playing, or if I put the sequences in an <>END node, it will continue to show the previous node's dialogue, all while also playing the sequences, AND the player will have to press the continue button again to close the Dialogue UI.

Is there a way to have it so once you click the continue button on the final dialogue, the Dialogue UI clears out and then the sequences I put for the node to play? Putting @{{end}} doesn't work great for this because that is based on the timing of the text being typed out rather than the continue button being pressed.
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with executing sequences at the end of conversation

Post by Tony Li »

Hi,

Two options:

1. Add an empty node to the end, and include SetDialoguePanel(false) in the sequence. Example:

Code: Select all

SetDialoguePanel(false);
UpdateTracker();
Fade(out)
If conversations require the player to click the continue button, use a Continue() command, too. Example:

Code: Select all

SetDialoguePanel(false);
UpdateTracker();
Fade(out, 2); // Fade out over 2 seconds.
Continue()@2

2. Or, assuming conversations require the player to click the continue button, use @Message(Continued):

Code: Select all

required UpdateTracker()@Message(Continued);
Nothing in the Dialogue System actually sends the sequencer message "Continued", but the "required" keyword guarantees that the command anyway will run when the player ends the dialogue entry (i.e., by clicking continue).
MasterDavicous
Posts: 8
Joined: Mon Apr 10, 2023 12:42 pm

Re: Problem with executing sequences at the end of conversation

Post by MasterDavicous »

The second option using Continue() worked great for me! Thank you!
I've added that series of sequences to a shortcut {{endRegular}} and also some different shortcuts including different styles of screen transitions as well, and it made it very easy to end off conversations cleanly without needing to copy and paste all those sequences for every <>END node. (Just in case anyone else runs into this post!)
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with executing sequences at the end of conversation

Post by Tony Li »

Great! That sounds like a good approach.
Post Reply