Basic Behavior Tree help needed: Aborting tasks upon fulfilled condition

Hey hey,

I need some help with AI Behavior Trees, specifically, I want the AI to randomly select points on the map and go there (task for this is done and works), but if the AI sees the player (ConeCheck), it stops going for the previous patrol point and perform the AI charaters “special move” (different per child of the master character; one charges, one freezes, you should get the point)

I have read trough and followed the basic tutorial on tasks, decorators, services, and the trees itself, but I’m a total newbie to them.

The AI character uses an enum for its current state: “Idle” (no current task, so get a random point and start moving), “Moving” (currently en route to some point on the map) and “Alerted” (currently performing the special action).

Any suggestions would be nice, as I am totally new to AI, behavior trees, blackboard etc.

If screenshots are needed, I’ll provide them :slight_smile: