Can I use one 'Conversion' with multiple NPCs?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ierin2323
Posts: 10
Joined: Wed Feb 16, 2022 12:32 am

Can I use one 'Conversion' with multiple NPCs?

Post by ierin2323 »

Image


I am not good at English, so I ask questions through pictures.

Can I use one 'Conversion' with multiple NPCs (NPC1, NPC2, NPC3...) in this way?
If there is a way, how is it possible?

Or do I have to make and use each 'Conversation'?
(Conversation1, Conversation2, Conversation3 ...)
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I use one 'Conversion' with multiple NPCs?

Post by Tony Li »

Hi,

You can do that. Assign the same "NPC" actor to all conversations (0, 1, 2, 3).

Make sure to assign Npc1, Npc2, or Npc3 to the Dialogue System Trigger's Conversation Conversant field.

In Conversation 0's Dialogue Text, you can show the current NPC's name with the [var=Conversant] markup tag. Example:
  • Dialogue Text: "I'm [var=Conversant]. Welcome to my shop."
ierin2323
Posts: 10
Joined: Wed Feb 16, 2022 12:32 am

Re: Can I use one 'Conversion' with multiple NPCs?

Post by ierin2323 »

I think my explanation wasn't enough.


Image


This is what I want to do.

With Player and Npc1 : Start conversation 1(Player&Npc1) -> Ends -> Start conversation 0(Player&Npc1)

With Player and Npc2 : Start conversation 2(Player&Npc2) -> Ends -> Start conversation 0(Player&Npc2)

With Player and Npc3 : Start conversation 3(Player&Npc3) -> Ends -> Start conversation 0(Player&Npc3)
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I use one 'Conversion' with multiple NPCs?

Post by Tony Li »

Hi,

Your images aren't showing.

What I described above is very similar to your description. It works like this:

With Player and Npc1 : Start conversation 1(Player&Npc1) -> links to-> Start conversation 0(Player&Npc1)

With Player and Npc2 : Start conversation 2(Player&Npc2) -> links to -> Start conversation 0(Player&Npc2)

With Player and Npc3 : Start conversation 3(Player&Npc3) -> links to -> Start conversation 0(Player&Npc3)

Here's an example scene:

DS_MultipleVendorsExample_2022-02-21.unitypackage

In the scene, you can talk to 3 vendors. Each vendor starts their own conversation (conversation 1, 2, 3). Each conversation links to a shared shopkeeper conversation (conversation 0).
ierin2323
Posts: 10
Joined: Wed Feb 16, 2022 12:32 am

Re: Can I use one 'Conversion' with multiple NPCs?

Post by ierin2323 »

Thank you so much.
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I use one 'Conversion' with multiple NPCs?

Post by Tony Li »

Glad to help!
Post Reply