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.

  1. 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 the Convai Chatbot component.

  2. From the Components list add a Box Collision.

  1. Switch back to the Event Graph tab.

  2. Select the Box Collision you just added and scroll down in the Details panel. Under Events add the On Component Begin Overlap event to your event graph.

  1. Setup the following blueprint schematic which uses the Invoke Speech node from the Convai Chatbot component.

  1. Enter a Trigger Message that expresses what happened (i.e. "Player Approached") and you can add a simple instruction (i.e. Greet the player).

  2. Setting the In Generate Actions and In Voice Response boolean to true will let the Convai Characters perform actions and generate audio responses respectively.

  3. Hit Compile and Save then run the program.

  4. 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