Detecting collisions

First off, i’m not an expert. Take my words with a grain of salt

Second off… TPS is the hero character as in the player character right? If it is then the cast is always failing cuz youre casting the player character to the ai character (or vice versa). Not good. If its the player character add a get player character node and hook ut up to the object.

If TPS is the ai character then you should drag out a get ai controller node from controlled pawn and drag out get controlled pawn. I used to have a problem with casting to ai in tasks as well and i dont know why it works this way and not just from the controlled pawn node on the recieve execute. I honestly don’t.

Third off. If i understand you correctly, you want the move away task to execute when the ai character collides with the cone right? If so, you should just set up a component begin overlap in the ai character blueprint, check if other actor is TPP then check if other component is the cone. Then for each loop of all ai controllers with a branch to check if it is same with a get ai controller node for self reference. Then you add a blackboard value (figure out what value works with you, bool probably) and back at the ai char BP after the branch is true you set the value to true if its bool or whatever. And have the task under a decorator with that value. Dont forget to make the other decorators abort on change.

It’s janky, It’s complicated, and probably not the best solution, but it has worked with me when coding in the different hostility states for my own ai without a noticable performance drain.

Hope i was able to help you out, make sure to update me on wether this helped or not :slight_smile: