Page 1 of 2

Several Players

Posted: Thu Nov 28, 2024 1:37 pm
by Arturicon
Hello, everyone. I have a question. I want several characters whom player can control. Each of them should have a personal name and portrait. So I created a second actor and gave him Portrait Sprite, Name and set IsPlayer = true. Now i have two actors with IsPlayer = true. But when i use the second one in conversation the program shows me the portrait and the name the first one. So how can get what i want?

Re: Several Players

Posted: Thu Nov 28, 2024 3:14 pm
by Tony Li
Hi,

Make sure to assign the appropriate player actor to each dialogue entry node. It will also help to add a Dialogue Actor component to each player character's GameObject and set the Actor dropdown to the player actor. See also: Character GameObject Assignments.

Re: Several Players

Posted: Fri Nov 29, 2024 1:25 pm
by Arturicon
Thanks for the answer. I created two gameObject with dialog actor components and set actor in dropdown as you advised, and i left Conversation actor and conversant fields in dialogue system trigger, which launch dialog, empty. So now in Conversation settings (where title, description, etc) when I set actor drop down to first one player in dialog i see the first one, when second - i see second. But problem is that if i want two players in the same dialog it is impossible, because it doesn't matter witch player i set as actor in specific dialog entry, the program will show only the actor from conversation settings.
Is it possible to have two players in one conversation at the same time?

Re: Several Players

Posted: Fri Nov 29, 2024 3:16 pm
by Tony Li
Hi,

There are various scenarios (see Character GameObject Assignments for details) but I think for your case this setup will work best:
  • Create three player characters: one named Player, and two others for your actual player characters.
  • When you create a conversation, set the conversation Actor to Player and the conversant to an NPC.
  • When a line is spoken by a specific player character, inspect its dialogue entry and set the Actor dropdown to that player character. The node will show the player character's name and the text, separated by a colon ( : ). This indicates that the node isn't using the conversation's primary actor or conversant.
  • In your Dialogue System Trigger, you should be able to leave the Conversation Actor field blank. If this doesn't work, let me know how your Dialogue System Trigger is set up (in particular the Trigger dropdown).

Re: Several Players

Posted: Sat Nov 30, 2024 8:08 am
by Arturicon
I created three actors with IsPlayer=true. Two of them real players have their own gameObjects with dialogue actor component, the third one was set as actor in conversation settings. Then i did everything as you said. For each node i set up real player and it show at node "actor:phrase" form. But steel i can see portrait only one player.
If i creating gameObjects with dialogue actor for first "not real" player i would see only his portrait and name
I attach screenshot of my dialogue system trigger

Re: Several Players

Posted: Sat Nov 30, 2024 10:45 am
by Tony Li
Hi,

Would you please post a screenshot of an example conversation? If any lines can be spoken by either player (instead of a specific player), please mark that on the screenshot.

Re: Several Players

Posted: Sat Nov 30, 2024 12:10 pm
by Arturicon
If any lines can be spoken by either player (instead of a specific player), please mark that on the screenshot.
Not really understand what that means. In this situation all lines saying just Player, insted of player two and one

Re: Several Players

Posted: Sat Nov 30, 2024 1:41 pm
by Tony Li
Arturicon wrote: Sat Nov 30, 2024 12:10 pmIn this situation all lines saying just Player, insted of player two and one
Where does it say just Player? (In the response menu? In subtitles?)

Re: Several Players

Posted: Sat Nov 30, 2024 5:06 pm
by Arturicon
Only responses. Blue nodes.

Re: Several Players

Posted: Sat Nov 30, 2024 7:22 pm
by Tony Li
Hi,

On your dialogue UI, if you tick the StandardDialogueUI component's Conversation UI Elements > Use First Response For Menu Portrait, then the response menu portrait image will use Player One or Player Two instead of Player.