Has Received Event not working as expected


New member
Hi Justin

I am looking to use Has Received Event for when the NPC hears a sound from my sound manager. Unfortunately I can't seem to get the Has Received Event to return true.

I've structured a sample like so:


And added some debug statements inside the Has Received Event. The Registered is called, but RECEIVED is never called.


Registering to the event in another script works fine however. I get the received message and the desired vector


Do you have any suggestions for determining why the ReceivedEvent of the Conditional Task isn't working? I didn't post this in the bugs section because I'm assuming I'm just doing something wrong. (Also I posted on the Unity Forum before I realized I should post it here).

Thanks for your time

When is that event sent? Has Received Event is looking for the generic <object> version of the event, so you'll need to make sure you use ExecuteEvent with the generic object:

behaviorTree.ExecuteEvemt<object>("SoundHeard", (object)myVector3);
That was the issue.

In the documentation regarding this, the line says "If the Has Received Event task is receiving event then the template type must be a valid of object. ", and I interpreted it as "Valid Object" or not null, instead of "a value of Object".

I knew it was something I was doing wrong, thank you very much!