Page 1 of 1

Character Info / Speaker Info Wrong?

Posted: Sat Apr 10, 2021 7:20 pm
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.

Re: Character Info / Speaker Info Wrong?

Posted: Sat Apr 10, 2021 7:43 pm
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

Re: Character Info / Speaker Info Wrong?

Posted: Sat Apr 10, 2021 8:15 pm
by junwi21
That worked, thank you - i don't know how they got mixed up

Re: Character Info / Speaker Info Wrong?

Posted: Sat Apr 10, 2021 8:25 pm
by Tony Li
Glad I could help!