How to make in state tree aborting functionality for branches with their tasks?
For example:
Patrol State: (if player is not in sight)
—Get Patrol Point
—Move To Patrol Point
— Delay
Shoot Or Reload State: (if player is in sight)
—Shoot At Player State:
------Shoot
------Delay
—Reload State:
------Reload
------Delay
So how to make that if player becomes in sight it would abort in any task of patrol immediately?
One way is putting Patrol State into separate tree and same with Shoot Or Reload State, and by that bool change it would stop logic of concurrent state tree and switch to other one, but is it best way and good way? Or is there better solutions?