Event trigger and chatbox analysis/screening in Unreal

Original Discord Post by nekodiv | 2024-10-24 06:35:22

Hi, I have two questions:

  • The convaichatbox actor for Unreal. I see there is an events component for “On Emotion State Changed”. Is there documentation for this event function? Can we use that to trigger certain animations?

  • Is there a way I can screen the chatbox and be able to pick up certain words and output that into a string in Unreal so I can put it into a blueprint to perform certain actions? I’m trying to find a way where I can read the chatbox, grab a word from the chatbox (ex: “fun”) and then I can put that into a blueprint so that another character performs a certain animation sequence that ties to the word “fun”.

Images:

Reply by k3kalinix | 2024-10-28 09:24:49

<@1216254232957685765>

Reply by mighty_brute | 2024-10-28 13:03:47

First Answer: Yes, you can use the OnEmotionStateChanged delegate, but I am not sure about triggering animations based on that; it’s up to the game design. Moreover, it is just an event, and you can use it however it fits your needs. I am attaching a screenshot of how you can get the new emotion score for your reference.

Second Answer: Yes, you can pick certain words from the chat widget. There are two major delegates you should subscribe to: OnTextReceived and OnTranscriptionReceived. The chat widget is also populated from these events. You can also look into the Convai base player to see how the chat widget is populated.

Images:

Reply by chockie | 2024-11-01 01:13:17

we forgot to reply but thank you so much for the help!!!

Reply by chockie | 2024-11-01 01:13:38

may be troubleshooting this further in the next few days so will be lurking in this thread

Replying to mighty_brute’s Message

Reply by mighty_brute | 2024-10-28 13:03:47
First Answer: Yes, you can use the OnEmotionStateChanged delegate, but I am not sure about triggering animations based on that; it’s up to the game design. Moreover, it is just an event, and you can use it however it fits your needs. I am attaching a screenshot of how you can get the new emotion score for your reference.

Second Answer: Yes, you can pick certain words from the chat widget. There are two major delegates you should subscribe to: OnTextReceived and OnTranscriptionReceived. The chat widget is also populated from these events. You can also look into the Convai base player to see how the chat widget is populated.

Reply by nekodiv | 2024-11-04 05:56:45

Thanks for the reply.
Maybe I’m not doing it right… I’m having trouble getting the emotion score… I assume its getting sent out via Return Value?
Is there a way to capture the value from it? I can’t seem to see if it prints out anything since it can’t be put into a string.

Images:

Reply by nekodiv | 2024-11-04 23:39:33

Is there any documentation on OnEmotionStateChanged delegate and examples of what it can be used and how to trigger the event?

Reply by k3kalinix | 2024-11-06 11:55:26

Images:

Reply by k3kalinix | 2024-11-06 11:55:49

You can review this Event Graph

Reply by k3kalinix | 2024-11-06 11:56:22

You can access it on FaceAnim

Replying to k3kalinix’s Message

Reply by k3kalinix | 2024-11-06 11:55:26

Reply by chockie | 2024-11-06 19:20:24

thank you for your help!!! sorry if this is a stupid question but can the emotion data be pulled out even if we’re not using faceanim/the metahuman system? we’re planning on using a custom stylized cartoon model that to our knowledge isn’t compatible with metahuman

Reply by k3kalinix | 2024-11-08 20:47:40

Yes, why not. This is just an example BP.

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