NPC가 순차적으로 대사를 말하게 하는 방법

Announcements, support questions, and discussion for the Dialogue System.
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

NPC가 순차적으로 대사를 말하게 하는 방법

Post by minomod »

1. I want the NPC to speak on my own once only. The screen shot is only 1, not 2.

2. Conversation Trigger: I want to keep conversation without interruption even if the conversation is proceeding at the bottom with On Start state.

The picture I want is that when the main character passes by, the surrounding NPCs want to keep talking to each other.

3. Is it possible for NPCs A and B to talk to each other on their heads?
Attachments
2.png
2.png (19.16 KiB) Viewed 898 times
1.png
1.png (25.84 KiB) Viewed 898 times
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by Tony Li »

minomod wrote:1. I want the NPC to speak on my own once only. The screen shot is only 1, not 2.
Like this?
  • 1: Automatically proceed to 2.
  • 2: Wait for player to click continue button. Then proceed to 3.
  • 3: Wait for player to click continue button. Then proceed to 4.
  • 4: Wait for player to click continue button. Then end conversation.
If so, inspect 1 and set the Sequence field to:

Code: Select all

Continue()@{{end}}
minomod wrote:2. Conversation Trigger: I want to keep conversation without interruption even if the conversation is proceeding at the bottom with On Start state.

The picture I want is that when the main character passes by, the surrounding NPCs want to keep talking to each other.
Set it up like this:
  • On the Conversation Trigger, set the Trigger to OnTriggerEnter.
  • Assign NPC A to Actor.
  • Assign NPC B to Conversant.
  • In the conversation, edit the conversation properties and tick Override Conversation Properties. Then tick Override Subtitle Settings. Finally, change the Continue Button mode to Never.
When the player passes through the trigger collider, it will start a conversation between NPC A and NPC B. The conversation will run without any input from the player.
minomod wrote:3. Is it possible for NPCs A and B to talk to each other on their heads?
Yes. On NPC A:
On NPC B:
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by minomod »

I will only ask one at a time. I do not think Google translates well.

Q1. The character must output 1 to 4 words. However, only 1 is output and 2 to 4 are not output.
Attachments
11.png
11.png (204.09 KiB) Viewed 891 times
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by Tony Li »

I understand now. Thank you for posting the screenshot.

A bark shows only one node. The Dialogue System will select a node that links from START:

Image

After it shows one node, it's done.

To show several nodes in order (1, 2, 3, 4), use a conversation. If you want to show the conversation's nodes through a bark UI, add these components to the character:
  • Override Dialogue UI: Assign the character to the UI field.
  • Bark Dialogue UI
Image
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by minomod »

I tried it as explained but it does not print.

1. There is an NPC called A.
2. The NPC outputs 1 on the head.
3. 1 disappearing. 2 outputs.
4. 2 disappearing. 3 outputs.
5. 3 disappearing. 4 outputs.

I want to do this.

Now 1 is output and next 2 is not output.
Attachments
33.png
33.png (124.44 KiB) Viewed 887 times
22.png
22.png (106.52 KiB) Viewed 887 times
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by Tony Li »

With Conversation Trigger, use this conversation:

Image
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by minomod »

As described above, I confirmed in the UI that the conversations are played sequentially.

However, it does not appear in the actual game.

An error log is output.
(ArgumentNullException: Argument can not be null.
Parameter name: key)

The actor was assigned to the corresponding NPC, so the output was normal. Thank you.
Attachments
44.png
44.png (55.22 KiB) Viewed 881 times
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by Tony Li »

Try to assign the NPC as Conversant also. Here's an example scene: BarkMonologue_2017-08-08.unitypackage
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by minomod »

Thank you. NPC now progresses well in line.

Is it possible to output 1, 2, or 3 from the back when the dialog is already on the bottom like the attached screenshot?

The Conversrsation Trigger uses ON Start at the same time as the player and the NPC, so only one is played.
Attachments
55.png
55.png (219.38 KiB) Viewed 877 times
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC가 순차적으로 대사를 말하게 하는 방법

Post by Tony Li »

Yes, inspect the Dialogue Manager and tick Allow Simultaneous Conversations. This lets two conversations run at the same time.


If there is only one conversation and you want the girl with purple hair to show her lines over her head, please let me know. I'll explain how to do it.
Post Reply