I would recommend using Behavior Trees for this kind of stuff. Read this documentation and you will have everything you need.
I would recommend using Behavior Trees for this kind of stuff. Read this documentation and you will have everything you need.