Original Discord Post by jusi_cavalli | 2024-11-08 21:50:22
I want the NPC to have a delay time if the player or the user didn’t type anything the NPC should speak and say a custom message
Original Discord Post by jusi_cavalli | 2024-11-08 21:50:22
I want the NPC to have a delay time if the player or the user didn’t type anything the NPC should speak and say a custom message
Reply by k3kalinix | 2024-11-09 10:59:22
You can Invoke a trigger.
Reply by k3kalinix | 2024-11-09 11:00:54
There is a Invoke Speech function in NarrativeDesignTrigger.cs. You can use this.
Reply by k3kalinix | 2024-11-09 11:01:37
public void InvokeSpeech(string message)
{
if (convaiNPC != null && !string.IsNullOrEmpty(message))
{
ConvaiNPCManager.Instance.SetActiveConvaiNPC(convaiNPC, false);
onTriggerEvent?.Invoke();
convaiNPC.TriggerSpeech(message);
}
}
Reply by jusi_cavalli | 2024-11-09 13:23:49
Okay thanks
This conversation happened on the Convai Discord Server, so this post will be closed.