Question about skipping dialogues!

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Slo0N
Posts: 22
Joined: Wed Aug 25, 2021 1:36 pm

Question about skipping dialogues!

Post by Slo0N »

Good afternoon. Maybe this topic has already been raised, but I have not found it.

I will try to explain clearly and briefly.
I have all dialogs end with some action or actions.

How can I skip the dialog so that all the events that are in the last answer are called? How can I skip the dialog until the last stage of the conversation (sometimes there are two answers that have different events)?
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about skipping dialogues!

Post by Tony Li »

Hi,

If I understand you correctly, this is a feature that's common in visual novels. For example, you can click a button, and the conversation will advance until the end of the conversation or until it reaches a player decision point (player response menu).

To set that up with the Dialogue System, add a Conversation Control component. You can add it to the Dialogue Manager or your dialogue UI. Then call its SkipAll() method -- for instance, in a UI Button's OnClick() UnityEvent.
Slo0N
Posts: 22
Joined: Wed Aug 25, 2021 1:36 pm

Re: Question about skipping dialogues!

Post by Slo0N »

Hi!
Attached a screenshot for example.
Image

SkipAll() - does not give us what we need. For example, we have a cue text, which is printed in 5 seconds, i.e. the answer appears after 5 seconds (this is for example). If we click on SkipAll(), then the cue text and answers will appear immediately.

In the example from the screenshot: If we start displaying D_6, then after I click SkipAll(), all the text D_6 and the answer D_7 appear, while I want D_10 and D_11 to appear. Is this possible?
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about skipping dialogues!

Post by Tony Li »

If you inspect the Dialogue Manager GameObject, you can UNtick Input Settings > Always Force Response Menu, and tick Subtitle Settings > Show PC Subtitles During Line. This will treat non-branching player nodes as subtitles, which SkipAll() will skip over.

However, this also means that it will skip over D_11.

To handle this, you'll need to write your own SkipAll-style method. You can start with the code in ConversationControl.SkipAll(). Change it so that it checks if the current conversation state has no responses. (ConversationState.hasAnyResponses) If it has no responses, stop there and don't skip.
Slo0N
Posts: 22
Joined: Wed Aug 25, 2021 1:36 pm

Re: Question about skipping dialogues!

Post by Slo0N »

The principle is clear. But it is probably better to avoid it for the time being. The question does not require an urgent solution. While I have dialogs not so linear, there are several answers in different branches complete the dialogue with different events.
Slo0N
Posts: 22
Joined: Wed Aug 25, 2021 1:36 pm

Re: Question about skipping dialogues!

Post by Slo0N »

And how do I end the conversation immediately and close the dialog panel? Well close - AbstractDialogueUI.Close() as I understand it. And end the conversation - DialogueSystemController.StopConversation(). Isn't it correct?
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about skipping dialogues!

Post by Tony Li »

Hi,

Just call DialogueManager.StopConversation(). This will take care of closing the dialogue UI, too.
Slo0N
Posts: 22
Joined: Wed Aug 25, 2021 1:36 pm

Re: Question about skipping dialogues!

Post by Slo0N »

Ok. Thank you very much :)
Post Reply