I can’t say Im exactly sure what you are after, but if you want to kind of restart the BT resting all node status, you can do:
owner.StopBehaviour();
owner.StartBehaviour();
With that said, I really think that a valid way of what you want is to use events and Interruptors or Accessors.
So you could create your MonoBehaviour and OnCollisionEnter of it, call SendEvent on the BehaviourTreeOwner.
In turn your CheckEvent condition tasks assinged on any Inrruptor or Accessor will respond to that event and interrupt the child node.
Let me know if you want a image of what Im suggesting here 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.