Hello and very sorry for late reply due to summer vacation!
Maybe the naming of the method (“OnForcedStop”) brings confusion, but I think this does what you want at least in the FSMs context. It should be called when the state exits/stops (even if the action is already stopped). Have you tried adding this to check it out?
Regarding Behaviour Trees this won’t work at all the way you suggest indeed however. This (OnForcedStop) is instead called when the action node (or tree altogether) resets. But in Behaviour Trees, the leaf is changing when the action has finished (returns Success, Failure or anything but Running), in which case the normal OnStop callback is called.
Can you please give the above change in my post a check in the context of FSMs if you haven’t already and let me know?
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.