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
Viewporttab. Note: the character blueprint can be a MetaHuman, ReadyPlayerMe, Reallusion or even a custom one you have created, just ensure that it has theConvai Chatbotcomponent.From the
Componentslist add aBox Collision.

Switch back to the
Event Graphtab.Select the
Box Collisionyou just added and scroll down in theDetails panel. UnderEventsadd theOn Component Begin Overlapevent to your event graph.

Setup the following blueprint schematic which uses the
Invoke Speechnode from theConvai Chatbotcomponent.

Enter a
Trigger Messagethat expresses what happened (i.e. "Player Approached") and you can add a simple instruction (i.e. Greet the player).Setting the
In Generate ActionsandIn Voice Responseboolean to true will let the Convai Characters perform actions and generate audio responses respectively.Hit
CompileandSavethen 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
Was this helpful?