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?
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.
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.
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?
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
Author
Posts
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.