AI logic solution needed!

Hello everyone!

I am currently working on a game where I have Player class and 3 NPC class. One of NPC class called the PoliceAI is responsible for patrolling - chasing and capturing the Player.

I have my state machine all done and working. Idle state when patrolling on a route, chase state when player with a weapon is spotted. Now what I need is some sort of Capture mechanics for when the Police comes close to Player position to Disable or Destroy the Player. I have tried via Trigger but cannot get it to work. I have tried setting Event but I failed.

I would like to avoid using attrition in my game (so no HP and stuff) and simply end the game for a Player if a Police catches him.

How to do it?

I am new. Is trigger best option? is it Event.args? is there a third way? Can you give me a simple example code for it? I am stuck on this for far longer than I expected.

Nvm. I managed to do a noob fix that is going to create a ton of problems for future me:

private void Update() {
    switch (state) {
        case State.Patrol:
            case State.Chase:
            if (player != null) {
            agent.destination = player.position;
            agent.speed = sprintSpeed;
            isRunning = true;
            if (Vector3.Distance(transform.position, Player.Instance.GetPosition()) <= 2f) {