Hi, I’m a very new Unreal and blueprints user, former Unity dev, working on a dialogue system along with this tutorial series, but working in 4.19.2, so making adjustments along the way to make it work with that version.
I’ve got behavior tree with a really simple sequence that starts with a task that lets the NPC speak when you click on them, and then, once the player clicks again, the speak task should finish executing and the next task, which lets the player reply, should start.
In the blueprint for the widget I made the HUD in, I have it set up to call my event dispatcher ‘OnSpeakFinished’ when they player clicks. I’ve added a print just to check that it’s getting this far, and it is.
Finally, in the blueprint for the speak task itself, it binds the event ‘FinishSpeak’ to ‘OnSpeakFinished.’ That way, once the NPC has spoken, if the player clicks, it should call FinishSpeak, which finishes executing the speak task. (Another print in there just for testing purposes.
All that together, as far as I can understand, should mean that when the player clicks, it should finish executing the speak task and move on to the reply one. I can’t piece together why it’s not.
Looking at it, I assumed the problem was that the FinishSpeak event wasn’t getting bound to OnSpeakFinished for some reason, but the craziest part is that when I go through it with the debug tools, it actually does work, then. If I put a breakpoint on any of the nodes in this blueprint before FinishSpeak, it’ll get there no problem, print the string I put in at the end to test it, and it’ll switch over to the reply task in the behavior tree.
Apologies in advance if any of this is unclear, I’m as new to these forums as I am to UE :] Glad to provide more context if necessary. Thank you for any help!