Continue()@Message(msg) being ignored

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dywindel
Posts: 4
Joined: Fri Jan 15, 2021 6:42 pm

Continue()@Message(msg) being ignored

Post by Dywindel »

Hi,

I'm very new to the Dialogue System and I'm trying to get a conversation to pause and wait before the player has performed a specific action. I have the dialogue manager continue button set to 'always'.

In my conversation tree, for the dialogue bubble I want to pause, I have set the sequencer code to

Code: Select all

Continue()@Message("Test")
In Unity, I have a simple collider that reacts when the player hits it and sends back a continue message to the sequencer.

Code: Select all

void OnTriggerEnter2D(Collider2D collider)
    {
        // Pass a message to the dialogue system telling it that it can continue
        Sequencer.Message("Test");

        print ("Test message has been sent");
    }
When I play the scene, the dialogue runs each time I pressed the continue button or the action button on controller. When it reaches the dialogue bubble with the pause code inside, the dialogue continues and does not wait.

What am I doing wrong here?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue()@Message(msg) being ignored

Post by Tony Li »

Hi,

That will only work if you're requiring that the continue button be clicked to advance each subtitle. (That is, you set the Dialogue Manager's Subtitle Settings > Continue Button dropdown to something like Always.)

If the Dialogue Manager's Subtitle Settings > Continue Button mode doesn't require the continue button to be clicked, try WaitForMessage instead:

Code: Select all

WaitForMessage("Test")
Dywindel
Posts: 4
Joined: Fri Jan 15, 2021 6:42 pm

Re: Continue()@Message(msg) being ignored

Post by Dywindel »

Hi Tony,

Yes, the first part is what I'm trying to setup and I've set the continue button to 'always'. I do want to click to continue each subtitle.

However, the Continue()@Message(msg) function is still being skipped when it's setup like this.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue()@Message(msg) being ignored

Post by Tony Li »

Sorry, I missed that you said you set it to 'always'.

When it continues, does the Console show "Test message has been sent"?

Are there any warnings or errors in the Console?

Double-check the spelling and capitalization of the sequence. Maybe it's hitting an error and moving on instead of waiting.
Dywindel
Posts: 4
Joined: Fri Jan 15, 2021 6:42 pm

Re: Continue()@Message(msg) being ignored

Post by Dywindel »

Hi Tony,

There are no warnings in the console. The "Test Message has been sent" does print out when I trigger it. Also, I double checked the spelling and everything looks ok.

It looks like there are actually two problems happening:
1) When I'm running the conversation, if I press continue when I reach the bubble that has the "Contine()@Message(msg)" sequence code inside, the conversation will continue, even if the Sequence.Message(msg) trigger has not been activated.
2) When I'm running the conversation, when I reach the bubble that has the "Continue()@Message(msg)" sequence code inside; if I trigger the Sequence.Message(msg) trigger, the conversation doesn't continue and will only continue once the user has given an action input.

The basic principle of what I want in my game to do is:
1) The player presses continue at almost every dialogue conversation
2) During an important piece of dialogue, the dialogue will pause, stay on screen, and the player will have to perform an action in the world before the dialogue will continue.

What's the standard way to implement this? It feels like I am doing it right with the Contine()@Message(msg) function, like it says in "Cutscene Tutorial 3: Messages", but it doesn't seem to be working.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue()@Message(msg) being ignored

Post by Tony Li »

Hi,

Your approach is right. There's probably just a little configuration issue somewhere.
Dywindel wrote: Sat Jan 16, 2021 7:43 am1) When I'm running the conversation, if I press continue when I reach the bubble that has the "Contine()@Message(msg)" sequence code inside, the conversation will continue, even if the Sequence.Message(msg) trigger has not been activated.
Change the Sequence to:

Code: Select all

SetContinueMode(false);  // Hide the continue button
Continue()@Message(Test);  // Wait for a message "Test"
required SetContinueMode(true)@Message(Test)  // Re-enable the continue button at the end
You can omit the "//comments". I just added them to explain what each line does. Also notice the lack of quotes around Test, which I'll explain below.
Dywindel wrote: Sat Jan 16, 2021 7:43 am2) When I'm running the conversation, when I reach the bubble that has the "Continue()@Message(msg)" sequence code inside; if I trigger the Sequence.Message(msg) trigger, the conversation doesn't continue and will only continue once the user has given an action input.
Sorry, I keep missing little details in your replies. Unlike traditional programming languages such as C#, sequencer commands are very simplified. The syntax was designed for writers, not programmers. In sequencer commands, you don't need to put strings in quotes.
Dywindel
Posts: 4
Joined: Fri Jan 15, 2021 6:42 pm

Re: Continue()@Message(msg) being ignored

Post by Dywindel »

Hi Tony,

That works perfectly! Thank you for the help and quick responses!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue()@Message(msg) being ignored

Post by Tony Li »

Happy to help!
Post Reply