Event Assistance

Forums 💬 NodeCanvas ⚙️ Support Event Assistance

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18608
    jynxter
    Participant

      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?

      Thanks!

      #18610
      Gavalakis
      Keymaster

        Hello,

        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”:
        [attachment file=”AgentOverride.png”]

        Doing the above, will send the event to the specified object only.
        Let me know if that works for you.

        Thanks.

        #18609
        jynxter
        Participant

          This worked perfectly. Thanks for the help!

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.