Feature Request: OnEnter / OnExit behaviors for Nested BTs / FSMs

Forums 💬 NodeCanvas ⚙️ Support Feature Request: OnEnter / OnExit behaviors for Nested BTs / FSMs

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16601
    zornor90
    Participant

      Hey,

      Currently, there is no easy way to ensure that OnEnter and OnExit conditions are always called when entering and exiting a nested BT / FSM – I’d love it if that could be added – maybe another node type?

      #16606
      Gavalakis
      Keymaster

        Hello there,

        Hmm. Can you please clarify what you mean by saying “OnEnter/OnExit conditions” and an example of what you mean?

        Thank you!

        #16605
        zornor90
        Participant

          Hey so basically what I mean is that let’s say I have a FSM with a few nodes. One of the nodes is a sub behavior tree. When that node is entered in the parent FSM, I’d like to call some OnEnter behaviors. And then when that node is exited, I’d like to call some OnExit behaviors. Currently, I’d have to create a separate node before and after the subtree with the behaviors I want, and that also might cause issues if the subtree is exited by an any state being called, meaning the OnExit node is never reached

          Sorry for the late response, please let me know if you need further clarification!

          #16604
          Gavalakis
          Keymaster

            Hey,

            Sorry for the late respone on my part this time :/

            Yep I think I understand what you mean now :). As far as I can tell, you want two new ActionLists in the SubBehaviourTree node: one ActionList for when the node enters and another for when the node exists, similar to how it is done in SuperActionState. Is that correct?

            If so, that will require for me to modify the SubBehaviourTree node in a way as to have those two extra ActionLists. I am afraid however that maybe this will make the node too much bloated, but on the other hand I can see how it can be useful.

            Please confirm if something similar to what the SuperActionState OnEnter and OnExit ActionLists is what you are indeed after (but of course on SubBehaviourTree node respectively).

            Thank you!

            #16603
            zornor90
            Participant

              Yeah that’s exactly right, basically I need some way of ensuring that some functions are always called when entering and exiting a subtree regardless of how the subtree is transitioned out of

              I would also love a way to ensure that things are called even if an any state transition is called while my FSM is in a subtree

              #16602
              Gavalakis
              Keymaster

                Thanks for clarifying. Even though this is the first time someone suggests this feature, I will take a look at adding it 🙂

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