Unreal NPC2NPC Manager Interrupting Second NPC

Original Discord Post by kevinlmarkley | 2024-11-06 20:22:58

Using the code from the google drive link on this video, “https://www.youtube.com/watch?v=tJ5DLgBat5I”, I have run into a bug. The code was initially working, however without any changes, it has stopped working and only the first NPC will talk but receive no response from the second.

Here are the steps to recreate:

  1. Play the game.
  2. Press “L” key to begin NPC2NPC conversation and create “ConvaiNPC2NPC_MGR” actor.
  3. First designated NPC will begin talking and their transcription will appear in the chat box.
  4. Once first NPC finishes talking, “ConvaiNPC2NPC_MGR” actor is destroyed and no response is received from second NPC.

Attempted fixes:

  1. Changed which NPC was first.
    The first NPC will always speak, but the second won’t.
  2. Used different NPCs.
    Same problem, no change as above.
  3. Made sure the NPCs were still valid.
    NPCs were still valid even after NPC2NPC_MGR actor was destroyed.

If I disable the “InterruptSpeech” event, I see that the “ConvaiNPC2NPC_MGR” is not destroyed but the second NPC will still not respond. This leads me to believe that the problem is occurring with the “ConvaiNPC2NPC_ChatbotHandler” blueprint or that the transcription portion of this blueprint has been running into an issue.

The “ConvaiNPC2NPC_ChatbotHandler” actors were destroyed along with “ConvaiNPC2NPC_MGR” in all cases.

Embedded Content:
AI NPCs Talking With Each Other | Convai Unreal Engine NPC to NPC t…
Characters in game worlds powered by Convai can chat with each other, share ideas, and even get another NPC to carry out actions. This tutorial showcases how you can add simple blueprints to add this functionality and even provide topics that these characters will talk about. More updates on this feature will be coming out soon along with integr…
Link: https://www.youtube.com/watch?v=tJ5DLgBat5I

Reply by k3kalinix | 2024-11-11 16:10:34

Hello <@488138078339203093>,

I could not reproduce this issue. Can you please test the sample project?

Reply by kevinlmarkley | 2024-11-11 18:10:20

Sure, I will give it a try.

Reply by kevinlmarkley | 2024-11-11 19:54:38

The sample project does work with the same characters. After coping the first person character code from there, the conversation does indeed work again. However, I consistently get this set of errors starting with this: “Blueprint Runtime Error: “Accessed None trying to read property InitiatorHandler”. Node: Branch Graph: IsValid Function: Execute Ubergraph Convai NPC2NPC MGR Blueprint: ConvaiNPC2NPC_MGR”.

Images:

Reply by kevinlmarkley | 2024-11-11 19:56:43

Which seems to occur at this location in “ConvaiNPC2NPC_MGR”.

Images:

Reply by k3kalinix | 2024-11-11 19:59:21

I suggest you look at the sample BPs here and implement them in your own main project.

Reply by kevinlmarkley | 2024-11-11 20:19:44

Okay, after coping the rest of the code over, I am experiencing an issue when interrupting the AI. It appears that one NPC will interact with me, and then the second will interact with me as if I just interrupted them and/or they are still talking to the other NPC.

Reply by kevinlmarkley | 2024-11-11 20:22:40

For example: I interrupt one NPC as they were telling a joke about how atoms made up everything. They then turned to me and told me what they were talking about and how that relates to their interests.

They asked me I what I thought and I responded with “that’s great!”.

The second NPC then told me the same joke about the atoms and then continued on about their interests and the topic of conversation.

Reply by k3kalinix | 2024-11-15 13:26:00

Hello <@488138078339203093>,

Reply by k3kalinix | 2024-11-15 13:26:40

I have not been able to reproduce this problem. Could you please record a video?

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