OnExit For NestedFSM asset

Forums 💬 NodeCanvas 🗨️ General Discussion OnExit For NestedFSM asset

  • This topic has 0 replies, 3 voices, and was last updated 4 years ago by Gavalakis.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13193
    shrimpworm@gmx.net
    Participant

      Is it possible to have an action state in a nested FSM that runs when the FSM is exited?

      Thanks!

      #13200
      Gavalakis
      Keymaster

        Hello there 🙂

        Right now this is not possible, but this feature has been requested  more than a few times (in one or another form). Is the goal here to basically execute a list of actions when the fsm exits?

        Let me know 🙂

        Thanks!

        #13199
        patrickl
        Participant

          I came here to request the same thing!

          I really like the power of nested FSM/BT’s however it can be a little messy when you need to clean up something when a higher state causes an exit transition. I’m forced to spread clean up logic in parent trees which adds the the clutter and increases chances of bugs. Having an OnEnter hook would be useful too.

          #13198
          shrimpworm@gmx.net
          Participant

            [quote quote=15623]Is the goal here to basically execute a list of actions when the fsm exits?  [/quote]

            Yeah exactly, like OnExit of the SuperActionState. Is there maybe a delegate one could hook an action to?

            #13197
            Gavalakis
            Keymaster

              Hello guys.

              I’ve created a new node called EnterExit State (its not really a state though). It has a list of actions that execute when the FSM starts/enters as well as another when the FSM stops/exits.

              Let me know if that works for you.
              Thanks.

              #13196
              patrickl
              Participant

                Thank you, that is great!

                Would something similar be possible for Behavior trees? I’m happy to have shot at coding it myself using this as a reference but not sure what type of node it should be on a BT?

                #13195
                shrimpworm@gmx.net
                Participant

                  Thank you very much!

                  #13194
                  Gavalakis
                  Keymaster

                    Hello again,

                    It could be made for BTs as well using very similar code, but of course deriving from BTNode instead. It is not something I am sure I would like to add official in BTs, but if you have any issues creating the node yourself let me know and I will make it for you 🙂

                    Thanks!

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