Text box to have Convai say whatever i write

Hello @Dylan_Suaris,

You can use the following method from NarrativeDesignTrigger.cs to make your Convai character speak a specific line of text. Additionally, you can utilize the <speak> tag within the message parameter to ensure the text is spoken exactly as written:

public void InvokeSpeech(string message)
{
    if (convaiNPC != null && !string.IsNullOrEmpty(message))
    {
        ConvaiNPCManager.Instance.SetActiveConvaiNPC(convaiNPC, false);
        onTriggerEvent?.Invoke();
        convaiNPC.TriggerSpeech(message);
    }
}

Example Usage:

InvokeSpeech("<speak> I'll say this exact line! </speak>");

How to Implement:

  1. Pass the desired text (including the <speak> tag if needed) into the InvokeSpeech method.
  2. Trigger this method through a button click or other event in your Unity project.

This ensures precise control over what the character says. Let us know if you have further questions! :blush: