Simulate pressing Continue button in script.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Simulate pressing Continue button in script.

Post by boz »

Is there a way to do something like the Continue(); Sequence but called from a script function?

:D Thanks
User avatar
Tony Li
Posts: 22162
Joined: Thu Jul 18, 2013 1:27 pm

Re: Simulate pressing Continue button in script.

Post by Tony Li »

Hi,

Yes:

Code: Select all

(DialogueManager.dialogueUI as StandardDialogueUI).OnContinue();
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: Simulate pressing Continue button in script.

Post by boz »

How would I do this in script?
SetContinueMode(false);

-------

I tried searching it in the documentation but it said no results. I'm not sure how to use the documentation, to be honest. Is there a section with a bunch of examples?

For example, even when I look up OnContinue(), I don't see anything that indicates (DialogueManager.dialogueUI as StandardDialogueUI).OnContinue() is how I would access it via script.

I can't find SetContinueMode in the documentation either.

I always feel dumb when I'm looking in documentation (any documentation), is there some secret to it?

Thanks for any help :D
User avatar
Tony Li
Posts: 22162
Joined: Thu Jul 18, 2013 1:27 pm

Re: Simulate pressing Continue button in script.

Post by Tony Li »

Hi,

You can use this C# code to do the same thing as the SetContinueMode(false) sequencer command:

Code: Select all

DialogueManager.displaySettings.subtitleSettings.continueButton = DisplaySettings.SubtitleSettings.ContinueButtonMode.Never;
if (DialogueManager.conversationView != null) DialogueManager.conversationView.SetupContinueButton();

Code documentation is difficult because there's always a balance between providing enough information and too much information that it becomes hard to search because there's just so much to search through.

If you can't find something quickly in the online manual, search this forum for "howto" (all one word) plus your question. I try to put the word "howto" in the subject lines of all how-to articles here for easier searching.
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: Simulate pressing Continue button in script.

Post by boz »

This worked like a charm, thank you :)
User avatar
Tony Li
Posts: 22162
Joined: Thu Jul 18, 2013 1:27 pm

Re: Simulate pressing Continue button in script.

Post by Tony Li »

Happy to help!
Post Reply