How to make a node 'Wait Until Something'?

Forums 💬 NodeCanvas ⚙️ Support How to make a node 'Wait Until Something'?

  • This topic has 0 replies, 3 voices, and was last updated 9 years ago by lijingsama.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #19378
    lijingsama
    Participant

      I want make a node, it is keep running state until it’s condition property is true.
      Any idea?

      #19385
      lijingsama
      Participant

        I made this. But not working.

        #19384
        Gavalakis
        Keymaster

          Hello,

          You can replicate what you are after with a Repeater Decorator and an Accessor Decorator underneath.
          For this you should set the Repeater in “Repeat Until Success”.
          So the Repeater will repeat the child node (Accessor) until it returns Success.

          You could certainly create a single node that does that. Let me know if you want such a node.

          Is that what you are after?

          Cheers

          #19383
          lijingsama
          Participant

            In my battle scene, be a game controller and some roles, they all based on NC.
            Game controller need to call roles to do something and need to know when it finished. So it is need a node “Wait Until Condition”.
            I built a node like upper replay, has a event string property.If the event is ture return success else run forever.
            It works well like follow photo.

            #19382
            Gavalakis
            Keymaster

              Hello,

              Nice 🙂
              So it’s more of a wait event action task.

              You could also make a specialized node (not task) that can be assigned a condition and that node return Running until the assigned condition returns true, os it could be more flexible as of what condition it waits for.

              Let me know if you need something like that.

              Cheers!

              #19381
              chocolacode
              Participant

                Hey Gavalakis,

                I am looking exactly for a Decorator like Wait Until Condition” and found this thread,

                What do you mean by “child node (Accessor) “,

                Can you show your above suggestion in a screenshot example? or can you provide such a node in code?

                thanks in advance!

                #19380
                Gavalakis
                Keymaster

                  Hey!

                  There is already a Decorator called “Wait Until” (waits until the condition becomes true), which was non-existent when this thread was started 🙂 It’s the last one in the Decorators menu. You can use it instead of the suggestion posted above.

                  “Accessor” Decorator, was the name of the now named “Conditional Decorator” at the time of this threat.
                  So Accessor Decorator = Conditional Decorator 🙂

                  Let me know if the ‘Wait Until’ Decorator works for you.
                  Cheers!

                  #19379
                  chocolacode
                  Participant

                    Hey,

                    that explains everything!!

                    thanks! 🙂

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