OnExit For NestedFSM asset

NodeCanvas Forums General Discussion OnExit For NestedFSM asset

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #15619
    shrimpworm@gmx.net
    Participant

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

    Thanks!

    #15623
    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!

    Join us on Discord: https://discord.gg/97q2Rjh

    #15633
    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.

    #15634
    shrimpworm@gmx.net
    Participant

    Is the goal here to basically execute a list of actions when the fsm exits? 

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

    #15666
    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.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #15673
    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?

    #15678
    shrimpworm@gmx.net
    Participant

    Thank you very much!

    #15681
    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!

    Join us on Discord: https://discord.gg/97q2Rjh

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