Event in a task

Ago251

New member
I need some help please. I have an event that I have to trigger when I reach a cell. This event is located in an action task. Is there a way not to be aware of the listeners?
 
You can register the event within OnAwake. The event may fire when the task isn't active but you can use a conditional task along with conditional aborts to respond to that event. This is similar to how the Has Received Event task works.
 
Thanks for the help! But...
...I have another problem. I have a Behaviour Tree that needs to be registered to an event from another Behaviour Tree. I tried to use the SendEvent task but I noticed that the task can send an event only to one GameObject. How can i resolve this?
 
SendEvent is sent from the Behavior Tree component rather than the GameObject so you can get a reference to that behavior tree component and send the event there. This page has an example:


If you need something more than this you can use your own event system.
 
Top