The high-level idea is that BT tasks should be triggering actions in AI and observing their progress. Also, BT tasks are responsible for aborting the action they’ve triggered when given BT task is aborted itself.
You can, of course, create a task that would micro-manage some activity in its tick, but we encourage people to avoid that approach if possible, since it’s less efficient.
So, following your example, to cancel move to stop and react to being shot you need to make your “react to being shot” behavior higher priority then the “move” behavior. This way, then the being-shot-reaction kicks in the move will get auto-aborted.
Now the question you might ask is “how does the higher priority behavior kick in”. The answer in one word is: Decorators. Our BT implementation is designed to be event-driven and we have a bunch of features to support that. The simplest one is decorators that can observe blackboard’s key and in reaction to value changes abort lower priority tree branches, or abort the branch they’re sitting on (or both!)
Hope it makes sense.
Cheers,
–mieszko