Custom actions as part of the text response

Original Discord Post by therealurself | 2024-04-24 09:10:42

Hi Just wanted to check if I can add the custom actions as part of the AI response. Like for eg I would want the character to cough (custom action) while having specific response. Is that possible? Another question is related to audio response how do I avoid the audio response when having custom action is part of the response? For eg I dont want the audio to pick " laugh I am doing well thank you" I want to skip the laugh as part of the audio file.

Reply by therealurself | 2024-04-26 02:03:47

any update here?

Reply by therealurself | 2024-04-26 02:12:18

I am currently looking at implementing a hybrid solution where the custom actions required is triggered by game logic rather than the convai. Just wanted to know if convai does it out of the box anyways.

Reply by k3kalinix | 2024-04-28 18:06:42

Hello <@81694064725983232>

Reply by k3kalinix | 2024-04-28 18:07:06

Are you using Unity?

Reply by therealurself | 2024-04-29 01:34:41

Yes I am using Unity

Reply by k3kalinix | 2024-04-29 09:36:20

What you want to do in Unreal Engine works as shown in the image below.

In the same way, in Unity, you can check the string response that comes from the server in the if statement with the String.Contains method. If it contains it, you can run the function you want.

Images:

Reply by k3kalinix | 2024-04-29 09:37:13

For voice, you can try to call the character’s Interrupt Function.

This conversation happened on the Convai Discord Server, so this post will be closed.