Checking guarded tokens

Forums 💬 NodeCanvas ⚙️ Support Checking guarded tokens

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17205
    richard
    Participant

      Is there a way to check if a token is being guarded by a Guard node in a condition task? The desired behavior would be to prevent the decorated child from running if the token is being guarded, but not to actually guard the token itself.

      Thanks!

      #17208
      Gavalakis
      Keymaster

        Hello Richard!

        There is no way to check this, but considering that a branch in already guarded, why is there the need to check this again with a condition? 🙂
        Is the use case related to using along with Parallel Composite? Can you please share a screenshot of what you want to achieve more or less?
        I could add some option for this, but I just want to confirm the use case 🙂

        Thanks!

        #17207
        richard
        Participant

          Yep, the use case in mind would be when a parallel composite is repeatedly run, and there are multiple child nodes which will guard if applicable, but otherwise there is a passive node which should be run when nothing is guarding.

          I’ve attached an example screenshot.

          #17206
          Gavalakis
          Keymaster

            Hello again and sorry for the late reply due to summer vacation.

            Hmm.. I think that a Selector would be a better candidate for such “branching”. Have you considered using a Selector like this example instead, or
            is this totally outside the use case?
            [attachment file=”Selector.png”]

            By the way, you don’t need to use a “Repeat” node as the root node, since the Behaviour Tree would already repeat automatically, if the “Repeat” option in enabled in the Behaviour Tree Owner inspector 🙂

            Please let me know.
            Thank you.

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