Has Received Event

Ago251

New member
I have a situation where I am sending an event to the behavior tree from an external script.

I'd like to know if what I've done is right.
 

Attachments

  • HasReceivedEvent.PNG
    HasReceivedEvent.PNG
    64.4 KB · Views: 35
  • SendEvent.PNG
    SendEvent.PNG
    30.6 KB · Views: 35
In order for Has Received Event to receive the event it needs to be reevaluated using conditional aborts. Here's a basic example of using conditional aborts:


Instead of the Can See Object task you'd have Has Received Event. Also, when you are sending the event it is looking for the object version of the parameters so you'll need to do :

Code:
behaviorTree.SendEvent<object, object>("PerceivedVampire", (object)transform.position, (object)arg2.gameObject.GetComponent<Pawn>());
 
Top