SetContinueMode Forcing Conversation to Auto Progress

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by Tony Li »

Hi James,

If you set the Dialogue Manager's Other Settings > Debug Level to Info and play the scene, you'll see that it does what it's told.

The "Test Started" node has this Sequence:

Code: Select all

SetContinueMode(false)->Message(Stop);
Fade(stay, .75)@Message(Stop)->Message(Sleep);
Delay(2)@Message(Sleep)->Message(Wake);
1. It will immediately set the continue button mode to Never.
2. It will immediately fade to black over 0.75 seconds.
3. At the 0.75-second mark, it will delay for 2 seconds. Then it will send the sequencer message "Wake".

As far as I can see, nothing is waiting for this sequencer message.

So then it proceeds to the next node, "Test Ended". Since continue mode is still Never, it just plays the Dialogue Manager's Default Sequence -- which is Delay({{end}}) -- and then immediately proceeds to the next stage of the conversation, which is to end the conversation.

First note: Since SetContinueMode(false) runs immediately, you don't need Message(Stop). Try this:

Code: Select all

SetContinueMode(false);
Fade(stay, .75)->Message(Sleep);
Delay(2)@Message(Sleep)
Second note: If you want to turn continue button mode back on and automatically continue, try this:

Code: Select all

SetContinueMode(false);
Fade(stay, .75)->Message(Sleep);
Delay(2)@Message(Sleep)->Message(Wake);
required SetContinueMode(true)@Message(Wake);
Continue()@Message(Wake)
When I tested this, I set the "Text Ended" node's Sequence to:

Code: Select all

Fade(in,0.75); {{default}}
so I could see the screen again.
Side Note
Side note: Your Character script registers and unregisters Flip() with Lua in OnEnable and OnDisable. But you disable Character during conversations. This means Flip() will be unavailable during conversations. If that's not what you intend, consider moving the registration and unregistration to Awake and OnDestroy instead.
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by jae026 »

I am going to test this. I have 2 other issues with 1 being the more urgent.

1. Does the input manager act different depending on the OS. I did a buid for Mac and the suers reported being able to hit space bar to progress/skip through a onversation and I have nothing setup to use the spacebar in conversations. It is used for UnUse but that is it. I do not get the behaviour in Editor or PC builds but I did get it in a Mac Build.

2. Bubble Template Standard UI Menu Panel NITW has 3 panels for selecting responses. You haelped me set this up some time back. Sometimes you can toggle between all 3 responses items even if there are only 2 nodes with dialogue. The extra one just shos up blank. O'm sure this is just a simple setting somewhere that was changed.

An example conversation is Chapter 2 "Chapter 2 - Evelyn/Hank - The Fight".
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by Tony Li »

Hi,
jae026 wrote: Fri Nov 06, 2020 1:34 pm1. Does the input manager act different depending on the OS. I did a build for Mac and the users reported being able to hit space bar to progress/skip through a conversation and I have nothing setup to use the spacebar in conversations. It is used for OnUse but that is it. I do not get the behaviour in Editor or PC builds but I did get it in a Mac Build.
There's nothing different in the Dialogue System for Mac. By default, spacebar is mapped to the "Submit" input used by Unity UI's EventSystem. If the Dialogue System has given focus to the continue button, then it's possible that the EventSystem detects the "Submit" input and clicks the focused button (i.e., the continue button).
jae026 wrote: Fri Nov 06, 2020 1:34 pm2. Bubble Template Standard UI Menu Panel NITW has 3 panels for selecting responses. You haelped me set this up some time back. Sometimes you can toggle between all 3 responses items even if there are only 2 nodes with dialogue. The extra one just shos up blank. O'm sure this is just a simple setting somewhere that was changed.

An example conversation is Chapter 2 "Chapter 2 - Evelyn/Hank - The Fight".
Update your CurrentResponsePage.UpdateCurrentPageDown method check if the next page's Button is interactable. If not, don't switch to it.
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by jae026 »

Thanks as always
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by Tony Li »

Glad to help!
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by jae026 »

SO I was able to replictae the submit button issue on PC. If I press play and do not move the mouse or anything else and just press space bar to progress the conversation then it uses that and allows the user to skip through conversations. If I press the ctrl key first and nothing else then it works as intended. Any advice?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by Tony Li »

Hi,

1. Inspect the Dialogue Manager. Set the Input Device Manager component's Input Mode to Mouse.

2. Make sure the Standard UI Subtitle Panel's 'First Selected' field is NOT assigned. If it's assigned the panel will tell Unity UI select (focus) it. When you press the Submit input (which is mapped to spacebar), it will click the current selection.

3. Then set Focus Check Frequency to zero. If Focus Check Frequency is greater than zero and the player has switched out of Mouse mode by using a gamepad, it will force a button to be focused. Since the subtitle panel only has the continue button, this will make the continue button focused.
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by jae026 »

Having some toruble with this could you explain a little please o where I need to set this? CurrentResponsePage.UpdateCurrentPageDown
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by Tony Li »

Hi,

Your project has a script named CurrentResponsePage. It's not a part of the Dialogue System, but it is on your Bubble Template Standard UI Menu Panel NITW. It works in conjunction with a script named ScrollSnap that you appear to have gotten from the Unity forum.

The CurrentResponsePage script has a method named UpdateCurrentPageUp(). (I wrote Down before; but for some reason your script move right with UpdateCurrentPageUp. It's no big deal though.) When the player presses the input to move to the next page (page 1 to page 2, or page 2 to page 3), it changes the current page. You should change this method so that it doesn't change from page 2 to page 3 if there's no valid page 3 response. For example, you could change UpdateCurrentPageUp() from this:

Code: Select all

public void UpdateCurrentPageUp()
{
    if (currentPage <= Pages.Count - 1)
    {
        currentPage++;
    }
}
to this:

Code: Select all

public void UpdateCurrentPageUp()
{
    var isNextResponseValid = currentPage <= DialogueManager.currentConversationState.pcResponses.Length &&
        DialogueManager.currentConversationState.pcResponses[currentPage].enabled;
    if (currentPage <= Pages.Count - 1 && DialogueManager)
    {
        currentPage++;
    }
}
Also put "using PixelCrushers.DialogueSystem;" at the top of the script.
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: SetContinueMode Forcing Conversation to Auto Progress

Post by jae026 »

Hey, I tried the script change and the third one still appears. Also, where can In set the volume of audioclips played from nodes? They seem to be set to max volume.
Post Reply