Page 1 of 1

Question about skipping dialogues!

Posted: Wed Jan 12, 2022 4:09 am
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)?

Re: Question about skipping dialogues!

Posted: Wed Jan 12, 2022 8:50 am
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.

Re: Question about skipping dialogues!

Posted: Wed Jan 12, 2022 1:17 pm
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?

Re: Question about skipping dialogues!

Posted: Wed Jan 12, 2022 1:49 pm
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.

Re: Question about skipping dialogues!

Posted: Thu Jan 13, 2022 12:46 am
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.

Re: Question about skipping dialogues!

Posted: Thu Jan 13, 2022 2:46 am
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?

Re: Question about skipping dialogues!

Posted: Thu Jan 13, 2022 8:48 am
by Tony Li
Hi,

Just call DialogueManager.StopConversation(). This will take care of closing the dialogue UI, too.

Re: Question about skipping dialogues!

Posted: Thu Jan 13, 2022 11:59 am
by Slo0N
Ok. Thank you very much :)