Is there a Skip function?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Is there a Skip function?

Post by minomod »

1. Suppose you have 10 lines.
2. I want to skip 10 or more conversations at once by pressing the skip button and end the conversation.
3. I want to create a skip button.
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Is there a Skip function?

Post by Tony Li »

You can use this method to immediately end the conversation:

Code: Select all

DialogueManager.StopConversation();
Will that do what you want it to do?
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: Is there a Skip function?

Post by minomod »

Can I write it like this in my C # code?
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Is there a Skip function?

Post by Tony Li »

Yes. Also put this at the top of your script:

Code: Select all

using PixelCrushers.DialogueSystem;
Or use the full name:

Code: Select all

PixelCrushers.DialogueSystem.DialogueManager.StopConversation();
Or, if you don't want to write any C# code, you can point a UnityEvent, such as the OnClick() event of a UI Button, to the Dialogue Manager's DialogueSystemController.StopConversation method. If you do this, make sure the UnityEvent's GameObject is also Don't Destroy On Load so it doesn't lose track of the Dialogue Manager during scene changes.
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: Is there a Skip function?

Post by minomod »

Thank you ~
You are my strong helper
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Is there a Skip function?

Post by Tony Li »

Happy to help!
Post Reply