Page 1 of 1

Issues with Continue Mode and WaitForMessage Commands

Posted: Tue Apr 11, 2023 12:35 pm
by KS_devteam
Hello,

our game has a situation where the player is asked by an npc to open up the inventory and choose a specific item, before the conversation is moving on. Therefore we used the: WaitForMessage(); sequencer command which by default is working fine.

An issue occurs, because we're also using a continue button in our dialogue ui. The continue button should only appear when the're is no response menue following on the next node. We did that by setting the continue button to "Not Before Response Menue", which also normally works out as intended.

Only when we the npc is waiting for an interaction and not an answer of the player, the continue button obviously still gets displayed, because there's no player response inbetween. In order to disable the continue-button in this special situation only, we tried the SetContinueMode(false) command and that's where things seem to get strange:

(1.) If we locally set the continuemode to false inside of the specific dialogue node, the "WaitForMessage()"-command gets just ignored and the sequencer moves on after the default delay.

(2.) If we globally set the continue button to "Never" in the Dialogue Manager, the WaitForMessage() command works out perfectly, but now we don't have a continue button anymore.

(3.) If we globally set the continue button to "Never" in the Dialogue Manager and then locally activate and deactivate the continue Button via SetContinueMode(t/f), things are similar to (1.).

(4.) If we put a player answer inbetween the last two nodes, there is no continuebutton and the sequencer waits for the message, but afterwards we obviously end up with an empty answering menue, which needs to be clicked manually.

Additionally: SetContinueMode(true) seems be executed for the node where the command is called, SetContinueMode(false) is always executing on the following node.

I really feel like something is setup wrong here or maybe we've overlooked an option in the dialogue manager?

Thank you! :)

Re: Issues with Continue Mode and WaitForMessage Commands

Posted: Tue Apr 11, 2023 2:25 pm
by Tony Li
Hi,

What version of the Dialogue System are you using? If you're not using the current version (2.2.35 as of this reply), can you back up your project and update?

SetContinueMode(true) and SetContinueMode(false) should both take effect in the current node.

Is it possible that WaitForMessage() is actually receiving the message in the node where you're calling SetContinueMode(False)?

Re: Issues with Continue Mode and WaitForMessage Commands

Posted: Tue Apr 11, 2023 3:18 pm
by KS_devteam
Hi Tony,

thank you for the fast reply!

I just found the source of the issue myself. Nevertheless this might be interesting for others too:

In the UI Prefab we're using for the NPC Dialogue subtitles we've set the Block Input Duration to a non zero value in order to delay the continue button. This seems to mess up with sequencer commands that are reffering to the continue mode.

After setting the value back to zero, everything works just fine.

Re: Issues with Continue Mode and WaitForMessage Commands

Posted: Tue Apr 11, 2023 3:26 pm
by Tony Li
Thanks for the explanation! I'll check that this case (Block Input Duration + SetContinueMode) is handled properly in 2.2.36.

Re: Issues with Continue Mode and WaitForMessage Commands

Posted: Wed Apr 12, 2023 12:40 pm
by KS_devteam
Hi Tony,

a little update on this: We also experienced a second situation where the switch of the continue mode doesn't work out / is delayed.

Only if the conversant of the node before the sequencer command is the same as the node where the command is called (like in the example on the right) the continue button disappears. If the node before is a PC node or another conversant, then the continue mode gets changed in the Dialogue Manager, but it doesnt effect the UI.

I also should note that we use different instances of the same NPC Subtitle UI Prefab for each conversant, because we use a speechbubble style ui for our game. We call the different Speechbubbles by separate DialogueActor Components in the scene.

Toggeling the Focus on and off doesn't change anything. Also if the NPC UI is always visible or gets refreshed every line has no effect on the issue. It doesnt matter if the conversation has only one NPC or multiple NPC's. Even in a scene with only one NPC Subtitle-Panel we experience the same effect.

At last we tried to set the continue button inactive by default so we can test if it actively gets turned on or is left on passively. It turns out it actively gets turned on, even if it manually has been turned off before. Could there be something wrong with the execution order of certrain functions?

Re: Issues with Continue Mode and WaitForMessage Commands

Posted: Wed Apr 12, 2023 2:44 pm
by Tony Li
This is the execution order:

1. ConversationView.StartSubtitle --> StandardDialogueUI.ShowSubtitle --> StandardUISubtitlePanel.ShowSubtitle.
(This step always hides continue button.)

2. ConversationView.ShowContinueButton or HideContinueButton --> StandardUISubtitlePanel.Show/HideContinueButton.
(StandardUISubtitlePanel.ShowContinueButton observes the Block Input Duration, as well as waiting first for the panel to open if using show/hide animations.)

3. ConversationView --> Sequencer.PlaySequence.

If Block Input Duration is nonzero, then it starts a coroutine that enables the continue button after the duration.

If the sequence has SetContinueMode() sequencer commands and Block Input Duration is nonzero, it's possible that SetContinueMode() has turned the continue button mode off, but then the Block Input Duration coroutine turns it back on. Could that be what's happening here?

Re: Issues with Continue Mode and WaitForMessage Commands

Posted: Thu Apr 13, 2023 11:49 am
by KS_devteam
Hi Tony,

I already turned the BlockInputDuration to zero after I identified this as a problem. Afterwards I still experienced some issues.

Since we updated from 2.2.34 to 2.2.35 I had the idea to manually delete and reimport the Standard UI Subtitle Panel of our Subtitle UI Prefab and rewire everything. This seemed to fix everything so far and also changed the behaviour of some other dialogue related things in our scene, like the visibility duration of some UI Assets.

Nevertheless I already prepared another graphic of the issues that happened before the manual fix I did, in case anybody else experiences the same strange situation.

Thank you!

Re: Issues with Continue Mode and WaitForMessage Commands

Posted: Thu Apr 13, 2023 2:45 pm
by Tony Li
Hi,

Thanks for the update and the annotated image. Sounds like something was miswired but configured correctly now. If you notice any new issues, let me know.