In the code below, the issue I’m having is that EndConversation() gets called before HandleDisplayNPCResponse() returns.
I’m working on a conversation system. I basically need the NPC’s dialogue to be displayed and allow the NPC enough time to complete speaking its line before continuing along in the code.
HandleDisplayNPCResponse();
//End of conversation?
if (NPCResponse.bForceConversationEnd)
{
EndConversation();
return;
}
HandleDisplayNPCResponse() is a BlueprintImplementableEvent. HandleDisplayNPCResponse is in charge of displaying the words of the NPC and delaying until the NPC is finished speaking. EndConversation is in charge of concluding the conversation and calling another BlueprintImplementableEvent which cleans up the UI.
There is a delay node in the DisplayNPCResponse and a print statement to confirm when the function is finished. However at the end of a conversation, the UI always gets removed by EndConversation() before the NPC response is finished displaying.
What is causing this? Is it just how Blueprint Events are handled?