Event-Aware Convai Characters
This document explains how to make characters respond to events happening in their surroundings with a small example.
Use of Invoke Speech function
Our goal in this example is to have the character welcome the player whenever the player enters a certain area, this can be done by using the Invoke Speech
node that basically invokes the AI character to talk and a simple collision box.
Open your AI character blueprint and select the
Viewport
tab. Note: the character blueprint can be a MetaHuman, ReadyPlayerMe, Reallusion or even a custom one you have created, just ensure that it has theConvai Chatbot
component.From the
Components
list add aBox Collision
.
Switch back to the
Event Graph
tab.Select the
Box Collision
you just added and scroll down in theDetails panel
. UnderEvents
add theOn Component Begin Overlap
event to your event graph.
Setup the following blueprint schematic which uses the
Invoke Speech
node from theConvai Chatbot
component.
Enter a
Trigger Message
that expresses what happened (i.e. "Player Approached") and you can add a simple instruction (i.e. Greet the player).Setting the
In Generate Actions
andIn Voice Response
boolean to true will let the Convai Characters perform actions and generate audio responses respectively.Hit
Compile
andSave
then run the program.On approaching a certain vicinity will trigger the event and the Convai Character will greet the character as mentioned in the Trigger Message.
The above example is just a simple use case. However, the use of Invoke Speech opens new doors to limitless use cases.
Last updated