Show response menu before the subtitle is finished

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hellwalker
Posts: 112
Joined: Tue Jan 19, 2016 11:37 pm

Show response menu before the subtitle is finished

Post by hellwalker »

Hey,

So for context, I have a dialogue menu similar to western isometric RPGs like Pillars of Eternity.
Image
So there is a subtitle text above and the response menu/continue button bellow.
And the behavior I'm looking for is:
#1) To show the continue button if the next dialogue node does not prompt response dialog.
#2) I want to immediately show the responce menu if the next dialogue node prompts response dialog.

So, sort of like this:
(Continue button masked as response entry)
Image
(Response options)
Image

This is so you don't have to click the redundant continue button if you will be hit with response menu afterward. So you don't go "1) Continue" and then "1) How are you?". Which is tiresome with large dialogues.

If I set the Continue Button setting in Dialogue Manager to "Not before Response Menu" it works like intended and it does not show up before the Response Menu, but then because I have AudioWait() as my default sequence it waits for that to finish before showing response menu.
I know I can probably write Continue() next to each dialogue node that is followed by a Response Menu, but that's not ideal. Because of routine work + sometimes the response logic could be optional and I might skip through the dialogue.

Is there an option to immediately show the response menu? or where should I look to modify that behavior?
Ideally, probably the response menu would not show up immediately but there would be a slight delay, maybe optional float? This is so if player spams continue button, they don't accidentally pummel through the response entries. So, a 2~3 second delay would give them a chance to stop.


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

Re: Show response menu before the subtitle is finished

Post by Tony Li »

Hi,

If you don't want the node to wait for the audio to finish, use Audio() instead of AudioWait(). You could set the NPC node to something like:

Code: Select all

Audio(myLine42);
SetContinueMode(false);
SetContinueMode(original)@2
This will wait 2 seconds before showing the continue button / response menu. To avoid having to type this for every node, use entrytags and set it as the Dialogue Manager's Default Sequence.

Here's an example scene, adapted from an earlier Deadfire-style example:

PoE2StyleExample2-2019-08-18.unitypackage
hellwalker
Posts: 112
Joined: Tue Jan 19, 2016 11:37 pm

Re: Show response menu before the subtitle is finished

Post by hellwalker »

Thanks! I guess I don't need AudioWait while I have continue button.

One problem I ran into is that "Not before Response Menu" does not seem to work with Group nodes. So, if there is a group node before a response option tree. In my case, these groups are the result of using Articy draft Hub nodes which DS imports as group nodes.

The other slight issue is the Audio does not stop when you continue to next dialogue node. Which happens when I use the AudioWait. Is the code in OnDestroy() stopping the sound in AudioWait?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show response menu before the subtitle is finished

Post by Tony Li »

hellwalker wrote: Sun Aug 18, 2019 4:38 pmOne problem I ran into is that "Not before Response Menu" does not seem to work with Group nodes. So, if there is a group node before a response option tree. In my case, these groups are the result of using Articy draft Hub nodes which DS imports as group nodes.
I'll try to reproduce this with an articy project. With a regular group node (not from articy), it works fine.
hellwalker wrote: Sun Aug 18, 2019 4:38 pmThe other slight issue is the Audio does not stop when you continue to next dialogue node. Which happens when I use the AudioWait. Is the code in OnDestroy() stopping the sound in AudioWait?
That's correct. I assumed you wanted the NPC's audio to keep playing to the end when the continue button / player response menu appears. If you interrupt it with a continue button and the NPC plays another line, it will stop the previous audio and start playing the new audio.

In version 2.2.0, I've added an AudioStop() command that you can use if you want different behavior, or if a different character starts talking and you want to silence the current talker.
hellwalker
Posts: 112
Joined: Tue Jan 19, 2016 11:37 pm

Re: Show response menu before the subtitle is finished

Post by hellwalker »

Ah, no what I meant is that during the normal dialogue sound is not interrupted with Audio command. So when you advance to next dialogue line both the previous line and the new line play simultaneously. Which does not seem to happen with AudioWait.

For response menu I indeed want the behavior you described. For sound to play until you a new dialogue line is selected.
hellwalker
Posts: 112
Joined: Tue Jan 19, 2016 11:37 pm

Re: Show response menu before the subtitle is finished

Post by hellwalker »

I'll try to reproduce this with an articy project. With a regular group node (not from articy), it works fine.
Ah, hmm might be in combination with linked dialogue? The group is in another conversation linked through the first one. I'll try to test exactly when this happens.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show response menu before the subtitle is finished

Post by Tony Li »

hellwalker wrote: Sun Aug 18, 2019 5:04 pm Ah, no what I meant is that during the normal dialogue sound is not interrupted with Audio command. So when you advance to next dialogue line both the previous line and the new line play simultaneously. Which does not seem to happen with AudioWait.
Are you using the oneshot parameter by any chance? That will change the behavior. Normally, if you run another Audio() command on the same subject it will interrupt the old audio clip to play the new audio clip. If you're switching characters, you'll need to use the AudioStop() command in 2.2.0.
hellwalker
Posts: 112
Joined: Tue Jan 19, 2016 11:37 pm

Re: Show response menu before the subtitle is finished

Post by hellwalker »

I was using Audio(entrytag); /AudioWait(entrytag); Where entrytag is a sound file associated in Articy and imported into DS.

But I'll be moving into a more dedicated audio solution for the whole game soon, so it's np. I can use AudioWait for testing until then.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show response menu before the subtitle is finished

Post by Tony Li »

Sounds good!
Post Reply