Changing the dialogs of NPCs during runtime

Original Discord Post by madscientist9178 | 2024-11-07 15:05:06

I have a scene with one patient. I can change his disease by clicking a button. The total number of diseases is 9. Each disease must change the dialog.

At ConvAI, I have 9 characters. Each one has a disease history. I changed the character script’s name and ID but he fails to respond. I have thought of having 9 gameobjects with the scripts loaded, and enable disable them accordingly but I have not tried this. Any idea on how to achieve this?

Images:

Reply by k3kalinix | 2024-11-07 15:11:23

Hello

Reply by k3kalinix | 2024-11-07 15:11:30

Just you have to Initialize the character.

Reply by k3kalinix | 2024-11-07 15:12:10

Embedded Content:
Managing sessionID Locally | Documentation
Session ID Management - Manage unique session IDs for Convai Unity integration.
Link: Managing sessionID Locally | Documentation

Reply by k3kalinix | 2024-11-07 15:12:25

InitializeSession(“CharacterName”, grpcClient, “YourCharacterID”);

Reply by k3kalinix | 2024-11-07 15:15:44

if (initializeSessionID) sessionID = await ConvaiGRPCAPI.InitializeSessionIDAsync(characterName, _client, characterID, sessionID);

Reply by k3kalinix | 2024-11-07 15:16:11

Check start method of the ConvaiNPC.cs

Reply by madscientist9178 | 2024-11-07 15:23:46

Thanks! I will try this

Reply by k3kalinix | 2024-11-07 15:24:14

Okay

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.