SuperActionList Kind of Like SuperActionState

Forums 💬 NodeCanvas 🗨️ General Discussion SuperActionList Kind of Like SuperActionState

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14022
    akyangliao
    Participant

      Hi,

      I create a class kind of like SuperActionState to have a onExitList in ActionList for behavior tree.

      Here is the code:

      The problem is other action will get called before the _onExitList execute. In the picture below. When I click the TestBool1, the first branch will execute first and set TestFloat1 to 1. Then the _onExitList execute to set TestFloat1 to 2. This is not the behavior I want. It should act more like state machine, which the _onExitList get called first, then set TestFloat1 to 1.

      #14025
      Gavalakis
      Keymaster

        Hey,
        Thanks for sharing.
        Have you tried called base.Stop() after _onExitList.ExecuteAction(agent, blackboard); ?

        #14024
        akyangliao
        Participant

          I tried it and it didn’t work.

          I think mainly is because how the tree/nodes get traverse. Currently, I am using 2.5.6c and here is the Selector.OnExecute.

          In my example, the Selector is dynamic, that’s why Reset is called after Execute. So I need a way to know if the condition is met, it will run Reset first. Same thing in Sequencer. This class is pretty helpful, I always like the idea of clean itself up. So you don’t need to put clean up code everywhere. So I would like to have some help to make this work. Cheers.

          #14023
          akyangliao
          Participant

            Anything about this update?

            Or maybe other way that I can interrupt the tree and run a list of nodes first, then resume back to the dynamic nodes?

            Please help.

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