How to use the Has Received Event Task?

DannSant

New member
Hello, I'm having issues with the Has Received Event Task.
I saw the documentation and I replicated what it says about having Conditional Aborts in order to be able to evaluate if the event has been received, but it is not working.
Here is my tree, what I'm trying to do is to check if the AI can see the player or if it receives the event then it will start chasing and fighting him. However the event is not being received and this task is always returning failure..

1674325111936.png

The event is being sent in a custom Task I created that references a component outside the behavior tree. I just started using Behavior Designer this week so I'm pretty much new, so I apologize if this was not how it's supposed to be implemented. This is the task I'm talking about:
1674325562014.png
AIManager is my component outside the tree
Finally, AIManager gets the BehaviorTreeComponent and sends the event
1674325649249.png

As you can imagine, the debug.log shown in the previous picture is being printed all right. also I tried adding a Debug.Log to the HasReceivedEvent script to check if the event was being received at all, and nothing is printed on the screen.

Finally, in case it helps, here is the full tree in execution mode:
1674325936121.png

Thanks in advance!
 
Update!
After some testing and reviewing the code, turns out I was only missing the type <object> when I called the SendEvent function
I'll leave it here in case anybody else has the same issue
1674399858623.png
 
Top