Page 1 of 2

[Solved] Three questions.

Posted: Tue Aug 21, 2018 6:14 am
by Japtor
Hi,

I have three questions.

The first one: Is there a way that the player character could execute a simple bark system but with multiple conversation nodes inside one Dialogue->Conversation?

The second one: Is there a way that inside one conversation node I could swap the Character or the NPC UI animation state? For example, in a conversation node where the NPC/Character is telling something happy/sad/etc, the animation state would change to idle to happy/sad/etc.

The last one: Continuing from the first question... Inside the bark system, I have the idea to change the UI image. The typical comic dialogue image where the Character is talking and the other where the Character is Thinking (the one that is a cloud). Is there a way I could swap them depending on the conversation node inside one Dialogue->Conversation?

Thank you very much! :)

Re: Three questions.

Posted: Tue Aug 21, 2018 10:12 am
by Tony Li
Hi,
Japtor wrote: Tue Aug 21, 2018 6:14 amI have three questions.

The first one: Is there a way that the player character could execute a simple bark system but with multiple conversation nodes inside one Dialogue->Conversation?
Are you asking about multiple barks, one after the other? If so, this is a conversation. If you want the player always to show conversation lines as a bark, add a Dialogue Actor component. Change Dialogue UI Settings > Subtitle Panel Number to Bark, and assign a bark UI to Bark UI Settings.

If you only want the player to bark a specific conversation, put that conversation's Dialogue System Trigger on a separate GameObject. Add two more components: Override Dialogue UI and Bark Dialogue UI. Assign the Bark Dialogue UI component to the Override Dialogue UI.
Japtor wrote: Tue Aug 21, 2018 6:14 amThe second one: Is there a way that inside one conversation node I could swap the Character or the NPC UI animation state? For example, in a conversation node where the NPC/Character is telling something happy/sad/etc, the animation state would change to idle to happy/sad/etc.
Yes, use the Sequence field. (See Cutscene Sequences.) For example:
  • Dialogue Text: "Yay! I'm so happy!"
  • Sequence:

    Code: Select all

    {{default}}; 
    AnimatorPlay(Happy)
The "{{default}}" keyword includes the Dialogue Manager's Default Sequence.

Another example:
  • Dialogue Text: "Watch me dance!"
  • Sequence:

    Code: Select all

    AnimatorPlayWait(Dance)->Message(Done);
    AnimatorPlay(Idle)@Message(Done)
This example doesn't need the Dialogue Manager's Default Sequence. It just plays the Dance animation until it's done, then returns to Idle.
Japtor wrote: Tue Aug 21, 2018 6:14 amThe last one: Continuing from the first question... Inside the bark system, I have the idea to change the UI image. The typical comic dialogue image where the Character is talking and the other where the Character is Thinking (the one that is a cloud). Is there a way I could swap them depending on the conversation node inside one Dialogue->Conversation?
There are a couple ways you could do this. With scripting, you could swap the image in an OnConversationLineO() method on the player.

Without scripting, in your dialogue database you could create a second player actor named "PlayerThinking". Assign all thinking lines to the PlayerThinking actor.

Then add an empty child GameObject to the player. Name it PlayerThinking. Add a Dialogue Actor component, and assign your thinking cloud bark UI to it.

Re: Three questions.

Posted: Tue Aug 21, 2018 2:11 pm
by Japtor
Hi,

Thanks for your answers!

About the first question... Yeah! I am trying to only recreate some specific conversations with the bark system. The conversation only involves the character. However, I have tried your method and it didn't continue the conversation. Maybe I missed something?

Inside my player character I have put the Dialogue Actor as you can see:

Image

Then I have attached to the NPC (which will be transformed to a chest very soon) the Dialogue System Trigger with their components, the override Dialogue UI and the Bark Dialogue UI.

Image

Any idea?
Thanks! :)

Re: Three questions.

Posted: Tue Aug 21, 2018 2:40 pm
by Tony Li
Is your Dialogue Manager's Subtitle Settings > Continue Button dropdown set to a value that requires a continue button click?

If so, edit the conversation. Click on empty canvas space to inspect the conversation's properties. Tick Override Display Settings > Subtitle Settings. Then change the conversation's Continue Button dropdown to Never.

Re: Three questions.

Posted: Tue Aug 21, 2018 3:47 pm
by Japtor
Hi,

Well, it is true that I use Dialogue Manager's Subtitle Settings > Continue Button > always form my normal conversations.

I have changed the conversation that I want to show in the bark system with what you said before.

Image

However, the problem continues. Are you sure that in one of my post 'answers' where I have uploaded the two photos of the NPC and the Character has everything correct inside (Dialogue Actor, The Dialogue System Trigger, etc)? Maybe I left something important. Or maybe its another issue. I don't know.

Any idea? :)
Sorry for asking for your help so many times.

Thanks.

Re: Three questions.

Posted: Tue Aug 21, 2018 4:23 pm
by Japtor
Hi,

It seems I found the error. I thought you had to put inside the Dialogue System Trigger -> Actions -> Bark -> Etc the conversation. I changed to Dialogue System Trigger -> Actions -> Start Conversation -> Etc and it works.

Another question. Can I use/set up the continue button for the barks too?

Thank you very much for your Help! :)

Re: Three questions.

Posted: Tue Aug 21, 2018 9:41 pm
by Tony Li
Hi,

I'm glad you found the issue!

Yes, you can use continue buttons for barks. Here's an example: TestBarkConversation_2018-08-21.unitypackage

It's a very simple example. I added the bark UI to the player so I could customize it. I made these customizations:

1. Removed the Canvas Group and Animator. It was simpler to get working this way.

2. Added a continue button whose OnClick() event does two things:
  • Uses a Dialogue System Trigger to run this sequencer command:

    Code: Select all

    Continue()
    This continues the conversation.
  • Calls the bark UI's Hide method.
Then I set these overrides in the conversation's properties:
  • Override Display Settings > Subtitle Settings: Show PC Subtitles, Continue Button Always.
  • Input Settings: UNticked Always Force Response Menu.

Re: Three questions.

Posted: Wed Aug 22, 2018 4:41 am
by Japtor
Hi,

Thank you for your example!

I have tested it in your new scene. I have modified the Standard Bark UI (Script) -> And tick Wait for Continue Button. So the Bark UI doesn't disappear after 'x' seconds when I don't click the button. After changing that, when I click on the continue button, the entire dialogue UI disappears. I think it has to deal with "the continue button whose OnClick() event -> Calls the bark UI's Hide method", so I have switched it off. Now, when I start the conversation, the dialogue appears normal (by clicking the continue button to change the conversation node), but when I reached to the final dialogue conversation node and click continue, the UI stills there and doesn't disappear. I guess it is because there is no the animation. Is this approximation fine?

Another thing... I have moved this example to my scene. When I start that bark conversation with the NPC, the Dialogue UI -> Dialogue Panel -> Text Panel appears and it shouldn't.

Any idea?
Thanks :)

Re: Three questions.

Posted: Wed Aug 22, 2018 9:38 am
by Tony Li
Hi,

I didn't realize exactly how you wanted to set this up. I think it's going to be easier to run it as a regular conversation using a custom subtitle panel. It's not much different than what you're doing now, except it's simpler.

Please import this: BarkConversationExample_2018-08-22.unitypackage

And play "Bubble Subtitle Example 2". (The original Bubble Subtitle Example was made for a different forum question.)

In this scene, the player has a custom subtitle panel that appears as a speech bubble, like a bark.

If you only want to use the custom subtitle panel for specific conversations or dialogue entries, move it to a child GameObject named something like "PlayerBark". Then create an actor in your database named "PlayerBark", and assign dialogue entries to this actor.

Re: Three questions.

Posted: Wed Aug 22, 2018 10:38 am
by Japtor
Hi,

Thanks for the answer.

Yeah, it's a very nice approximation.

One question... When I include this in my scene and make it play, the bubble appears fine with its text, but it also shows the normal Dialogue UI panel -> Dialogue Panel -> Subtitle Panel 1 (PC) and Text Panel. Is there a way to avoid showing them and only show the bubble for this specific moments?

Thanks! :)