It is true that in such a case, the action on the left is executed before the OnStop method of the action on the right is called.
The reason why this happens, is that for the lower priority task (on the right) to be interrupted in the first place, a higher priority task (on the left) much already have returned Success, which means that for this to happen, it already is executed (and only after that the interruption takes place).
While I understand that conceptually it may make more sense the way you describe it, this is not really a bug, but rather an expected behaviour with the current implementation and how interruption works. Ideally, tasks should not be tightly coupled together in a sense that they depend on one another. What I mean by that, is that if a task required a specific “world state” for it to function properly, then it’s always best if it takes care of that state itself in it’s “OnExecute”, rather than requiring other tasks “OnStop” to do so.
Please let me know if that helps.
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.