How to make two subtitle panel that can show choices?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
juliusdays
Posts: 10
Joined: Thu Dec 20, 2018 4:41 am

How to make two subtitle panel that can show choices?

Post by juliusdays »

Hi, I make story game that didn't have player as actor. All choices is NPC.

I have questions
1. I need to make two subtitle panel that also have response panel. How to do that?
2. How to set the Dialogue Entry is the choice if there's no actor is a player.
3. How to switch different response menu panel? I have 3 kind of response panel.
4. How to set the choices to call my script?
User avatar
Tony Li
Posts: 21928
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to make two subtitle panel that can show choices?

Post by Tony Li »

Hi,
juliusdays wrote: Thu Dec 20, 2018 6:07 am1. I need to make two subtitle panel that also have response panel. How to do that?
Would you please post a mock-up of what you mean? You can just draw it in MS Paint or on paper and post it as an image in a reply.
juliusdays wrote: Thu Dec 20, 2018 6:07 am2. How to set the Dialogue Entry is the choice if there's no actor is a player.
The choice doesn't have to correspond to a player GameObject. But in the dialogue database the actor's Is Player checkbox must be ticked. This checkbox tells the Dialogue System to show the dialogue entry node as a choice.
juliusdays wrote: Thu Dec 20, 2018 6:07 am3. How to switch different response menu panel? I have 3 kind of response panel.
Please see my question about #1.
juliusdays wrote: Thu Dec 20, 2018 6:07 am4. How to set the choices to call my script?
There are several ways. You can choose the way you prefer.

a. Register your script method with Lua. Then you can call it in the choice node's Script field.

b. Or make it a custom sequencer command. Then you can use it in the Sequence field.

c. Or, if your script method uses no parameters or one parameter, use the SendMessage() sequencer command.

d. Or, if your script is on a ScriptableObject asset and not in the scene, hook it up to the choice node's OnExecute() event.
juliusdays
Posts: 10
Joined: Thu Dec 20, 2018 4:41 am

Re: How to make two subtitle panel that can show choices?

Post by juliusdays »

Actually I made my own UI system for this dialogue. I just confused how to integrate it with DS. Maybe I will use IDialogueUI to make new UIDIalogueManager for my UI system. I use VIDE Dialogue before just for dialogue script editor and it has limitation when I want to edit or add more thing to the dialogue node so I think to use DS instead.

My Dialogue is use 2 type character called Character and Narrator.

This is my narrator panel for asking player choices
Screen Shot 2018-12-20 at 22.32.17.png
Screen Shot 2018-12-20 at 22.32.17.png (63.6 KiB) Viewed 1111 times
The attachment Screen Shot 2018-12-20 at 22.33.00.png is no longer available
The attachment Screen Shot 2018-12-20 at 22.32.17.png is no longer available
juliusdays
Posts: 10
Joined: Thu Dec 20, 2018 4:41 am

Re: How to make two subtitle panel that can show choices?

Post by juliusdays »

This is my two subtitle panel. The actor is more than two person and appear according to the dialogue sequence
Screen Shot 2018-12-20 at 22.35.09.png
Screen Shot 2018-12-20 at 22.35.09.png (177.84 KiB) Viewed 1111 times
juliusdays
Posts: 10
Joined: Thu Dec 20, 2018 4:41 am

Re: How to make two subtitle panel that can show choices?

Post by juliusdays »

Tony Li wrote: Thu Dec 20, 2018 8:43 am Hi,
juliusdays wrote: Thu Dec 20, 2018 6:07 am2. How to set the Dialogue Entry is the choice if there's no actor is a player.
The choice doesn't have to correspond to a player GameObject. But in the dialogue database the actor's Is Player checkbox must be ticked. This checkbox tells the Dialogue System to show the dialogue entry node as a choice.
juliusdays wrote: Thu Dec 20, 2018 6:07 am4. How to set the choices to call my script?
There are several ways. You can choose the way you prefer.

a. Register your script method with Lua. Then you can call it in the choice node's Script field.

b. Or make it a custom sequencer command. Then you can use it in the Sequence field.

c. Or, if your script method uses no parameters or one parameter, use the SendMessage() sequencer command.

d. Or, if your script is on a ScriptableObject asset and not in the scene, hook it up to the choice node's OnExecute() event.
Thank you for the answer :)

Btw, How to call DialogueManager to continue the dialogue entry?
User avatar
Tony Li
Posts: 21928
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to make two subtitle panel that can show choices?

Post by Tony Li »

Hi,

Here is one way you could set up your UI using the Standard Dialogue UI:

Image

Set up:
  • one subtitle panel in the top left.
  • one subtitle panel in the top right.
  • one menu panel in the bottom.
Assign the buttons to the StandardUIMenuPanel's Buttons list:

Image

Each button will have a number in the Buttons list (0, 1, 2, etc.). In your response node text, use the [position=#] markup tag to specify which button to use.

For example, if your response node text is "[position=3] This is a response." then it will appear here:

Image

This is just one way to do it. There are other ways. I just suggested this way because I think it should be relatively easy to set up.
juliusdays wrote: Thu Dec 20, 2018 10:43 amBtw, How to call DialogueManager to continue the dialogue entry?
If you've set the Dialogue Manager's Subtitle Settings > Continue Button mode to a mode that requires a continue button, such as Always, add a continue button to your dialogue UI's subtitle panels. See the Basic Standard Dialogue UI for an example.
If you want to continue using a C# script
If you want to continue using a C# script, use DialogueManager.conversationView.OnContinueConversationAll() or OnContinueConversation(ui). The Dialogue System can run simultaneous conversations. If you want to continue all of them, use OnContinueConversationAll. If you only want to continue one conversation, use OnContinueConversation(ui) and specify the dialogue UI that the conversation is using.
juliusdays
Posts: 10
Joined: Thu Dec 20, 2018 4:41 am

Re: How to make two subtitle panel that can show choices?

Post by juliusdays »

Hmm yeah that can be done like that and yes there's another way to do like that. Thank you for your explanation, now I can figure it out how to migrate my dialogue system to DS :)
Tony Li wrote: Thu Dec 20, 2018 2:57 pm
juliusdays wrote: Thu Dec 20, 2018 10:43 amBtw, How to call DialogueManager to continue the dialogue entry?
If you've set the Dialogue Manager's Subtitle Settings > Continue Button mode to a mode that requires a continue button, such as Always, add a continue button to your dialogue UI's subtitle panels. See the Basic Standard Dialogue UI for an example.
If you want to continue using a C# script
If you want to continue using a C# script, use DialogueManager.conversationView.OnContinueConversationAll() or OnContinueConversation(ui). The Dialogue System can run simultaneous conversations. If you want to continue all of them, use OnContinueConversationAll. If you only want to continue one conversation, use OnContinueConversation(ui) and specify the dialogue UI that the conversation is using.
I will use OnContinueConversation(ui). Thank you so much :)
User avatar
Tony Li
Posts: 21928
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to make two subtitle panel that can show choices?

Post by Tony Li »

Happy to help!
Post Reply