Page 1 of 1

Problem with speakers when multiple players are connected

Posted: Sun Dec 19, 2021 12:22 pm
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!

Re: Problem with speakers when multiple players are connected

Posted: Sun Dec 19, 2021 1:56 pm
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.