Character Info / Speaker Info Wrong?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
junwi21
Posts: 35
Joined: Wed Jan 27, 2021 12:18 am

Character Info / Speaker Info Wrong?

Post by junwi21 »

Hello, i have a bug in my game with a script that triggers every time the speaker swaps.
I have narrowed down the bug. The problem is that when the script is called - the speaker info of the currently speaking NPC returns the Player's transform instead of it's own. o_O

Any idea of what could cause this? If it helps, the NPC is walking towards the player (through Unity's built in NavMesh) but the NPC will stop before it reaches the exact player position.
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Character Info / Speaker Info Wrong?

Post by Tony Li »

Hi,

Inspect the conversation's properties. (Dialogue Editor: Menu > Conversation Properties) Make sure the Player actor is assigned as the conversation's Actor and the NPC is the conversation's Conversant.

Then check your Dialogue System Trigger. Make sure the player GameObject is assigned to the Conversation Actor field, and the NPC GameObject is assigned to the Conversation Conversant field.

More info: Character GameObject Assignments
junwi21
Posts: 35
Joined: Wed Jan 27, 2021 12:18 am

Re: Character Info / Speaker Info Wrong?

Post by junwi21 »

That worked, thank you - i don't know how they got mixed up
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Character Info / Speaker Info Wrong?

Post by Tony Li »

Glad I could help!
Post Reply