Okay, So I’ve got what I think is a fairly simple task, but I cannot figure out how to do it.
I’m learning by making simple tasks on how to use NodeCanvas.
Objective: Hit a Target with a Projectile that will Trigger a Door to Open.
I have 3 Objects. a Door, a Target, and a Ball (projectile).
When the Ball Hits the Target, It should Trigger the Door to open.
When the Ball and Target interact, Messages work fine, but I can’t send an event to the associated Door.
If I set the Message to Global, it works, but since I’ll have multiple doors/targets and don’t want them all to open each time any target is hit.
What is the best practice for achieving something like this?
Does your Door object also have a GraphOwner component (BehaviourTreeOwner, FSMOwner)?
If so, you can explicitely select the object to receive the event of a SendEvent action, by overriding the agent at the top where it reads “Self”:
Doing the above, will send the event to the specified object only.
Let me know if that works for you.