Response Menu Sequence and Continue Mode

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
TobyM
Posts: 14
Joined: Wed Dec 26, 2018 5:03 pm

Response Menu Sequence and Continue Mode

Post by TobyM »

Hello again!

Firstly, thanks for including my requested features in the last updates, really helped me a lot!

Got again some new questions and problems. The first one is once again related to articy:draft and response menu sequences. In your articy:draft template, the field name is “Response_Menu_Sequence”. But after importing the XML, instead of adding it to the field “Response Menu” it creates a new one. Tried to change the field name in articy:draft but it’s not possible to add a blank space to the name.

The second problem I’m facing is related to the “SetContinueMode()” sequence.
In certain dialogues nodes, I want to prevent the user from pressing the continue button (I used your “UI Button Key Trigger” script to tie it to the right mouse button). While the continue mode is set to false, I execute some other sequences before I switch the continue mode back a couple of seconds later. The problem is that if I click rapidly, sometimes the “SetContinueMode(false)” seems to be ignored. The other sequences that get started at the same time, will be played but not if they are time delayed. An example:

Code: Select all

SetContinueMode(false); 
AnimatorBool(Sitting, false, Lars); 
Walk(0,-1,Lars); 
StopWalk(Lars)@0.7; 
SetContinueMode(true)@1.3;
I’ve created some command sequences that let my characters move and stop during the dialog. Now the walking sequence is played, but because I’m clicking to fast, “SetContinueMode” and “StopWalk ()@0.7” are skipped, which breaks all cutscenes. But when I check the console with debug level info enabled, it appears that all the sequences are at least played.
Sometimes “SetContinueMode” is not skipped, but instead, the mode is switched on the following dialogue node, which blocks the player from continuing (I set the min subtitle seconds to 100000 because I don't want auto continue)
I can’t really fix this issue with “require”, because it’s important, that the sequences are played in a certain order. But I added it to some “SetContinueMode(true)” so at the very least you don’t get stuck.

Tried to solve this problem for a while now, (for example I tried to delay the continue click, but that created just new problems) but unfortunately, I was not able to find a solution ...
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response Menu Sequence and Continue Mode

Post by Tony Li »

Hi,

I'll check the articy import issue and get back to you.

For the continue button issue, try putting the keyword "required" in front of the SetContinueMode() command.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response Menu Sequence and Continue Mode

Post by Tony Li »

The articy Response_Menu_Sequence issue is fixed in a patch available on the Pixel Crushers customer download site. If you don't have access, please PM me your Unity Asset Store invoice number so I can set up access for you.
TobyM
Posts: 14
Joined: Wed Dec 26, 2018 5:03 pm

Re: Response Menu Sequence and Continue Mode

Post by TobyM »

Thank you very much for the quick response and the patch, tried it out and importing Response Menu Sequences now works perfectly.

Tried to add a "require" to every SetContinueMode() command, unfortunately, that didn't that didn't help. It just prevents the dialogue from getting stuck but if I click to fast, it ignores all the nodes, where the dialogue should actually be paused.

But after some more experiments, I think the problem has to do with the typewriter effect (or something related to it). I just changed the "Wait One Frame Before Starting" to true and now the sequence commands are played way more reliably. It still sometimes skips commands and some SetContinueMode(true) need a "require" to work, but this is at least an improvement.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response Menu Sequence and Continue Mode

Post by Tony Li »

Let's take a look at this part:
TobyM wrote: Mon Feb 18, 2019 1:14 pmThe second problem I’m facing is related to the “SetContinueMode()” sequence. ... But when I check the console with debug level info enabled, it appears that all the sequences are at least played.
Debug Level - Info will report 2 lines for every sequencer command. For example, take this command:

Code: Select all

SetContinueMode(true)@1.3
The first line appears as soon as the line starts. It reports the command as the sequencer's parser sees it, and the time that it will run. It will look something like this:

Code: Select all

Dialogue System: Sequencer.Play( SetContinueMode(true)@1.3 )
The second line appears when the command actually runs. It will look something like this:

Code: Select all

Dialogue System: Sequencer: SetContinueMode(true)
When the problem occurs, do you see both lines or only one?

In any case, while I'm happy to work with you to find a solution, I prefer that you also have something that works right now, too. Here is a workaround. You can add this script to your Dialogue Manager. When you want a dialogue entry to start with the continue button disabled, add a custom Boolean field named "DisableContinue" to the dialogue entry and set its value to true.

CheckContinueMode.cs

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;

public class CheckContinueMode : MonoBehaviour
{
    void OnConversationLine(Subtitle subtitle)
    {
        if (Field.LookupBool(subtitle.dialogueEntry.fields, "DisableContinue"))
        {
            DialogueManager.displaySettings.subtitleSettings.continueButton = DisplaySettings.SubtitleSettings.ContinueButtonMode.Never;
        }
    }
}
TobyM
Posts: 14
Joined: Wed Dec 26, 2018 5:03 pm

Re: Response Menu Sequence and Continue Mode

Post by TobyM »

Okay, that explains it, I only saw the "Sequencer.Play" lines in the console, didn't know that there is a second debug line.
As far as I can tell, it seems that the commands that are ignored don't show up in the console (no "Dialogue System: Sequencer: SetContinueMode(true)")

The weird thing is, now it suddenly works consistently, except for one single SetContinueMode command and one of my custom commands and I have no idea why. I spent literally weeks trying to find the source of the problem and now I'm suddenly not able to reproduce the issue. As mentioned, currently only one SetContinueMode command gets skipped and I wasn't able to find a pattern, why it happens on this single node.

But thanks for the workaround script, I'm sure this will come in handy, in case the cutscenes start to break apart again.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response Menu Sequence and Continue Mode

Post by Tony Li »

The workaround script is reliable because avoid any issues with strange sequences. But if you'd like to send a reproduction project to tony (at) pixelcrushers.com I'll be happy to take a look at the sequences and see if I can get to the bottom of it.
TobyM
Posts: 14
Joined: Wed Dec 26, 2018 5:03 pm

Re: Response Menu Sequence and Continue Mode

Post by TobyM »

Thanks, would be very grateful if you could take a look at this issue with the sequences. I'll send you the repro project to your email address.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response Menu Sequence and Continue Mode

Post by Tony Li »

Thanks for sending the repro project and such clear reproduction steps. I'm posting here to let you know that I replied to your email (in case it ends up in your spam folder).
Post Reply