Problem with speakers when multiple players are connected

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
w4der
Posts: 14
Joined: Sun Dec 19, 2021 12:07 pm

Problem with speakers when multiple players are connected

Post by w4der »

Hi,
I'm making multiplayer game and I have problem with the speakers, because the dialogue always take the first connected player.

For example:
- I can't start conversation because it take position of first conneted player istead of current one.
- for example, my sequener command that sets the clear shot for camera, also take the first connected player.

Code: Select all

var vcamGO = GetSubject(0);
var vcam = (vcamGO != null) ? vcamGO.GetComponent<CinemachineClearShot>() : null;
var target = GetSubject(1, speaker);
        

To be honest I'm a little bit confused how to check what is the current speaker and what is the current listener.
What is the difference between speaker and conversant "Player"?

As you can see in the Watches (screenshot_1.png) all fields are setup correctly to focus the second player.

Many thanks in advance!
Attachments
Screenshot_1.png
Screenshot_1.png (23.16 KiB) Viewed 152 times
conversant.png
conversant.png (10.94 KiB) Viewed 152 times
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with speakers when multiple players are connected

Post by Tony Li »

Hi,

Is this a local multiplayer game or networked multiplayer?

If it's local, please see: Character GameObject Assignments.

If it's networked, typically each client runs the Dialogue System locally -- that is, the client build has a Dialogue Manager GameObject. Dialogue System Triggers use the client's local player as the Conversation Actor.
Post Reply