How to make ai stop moving after colliding with a trigger box and playing an animation?

What does the behavior tree look like when the AI steps on the trigger? Does the BTTask fire off?

Without knowing exactly where this is failing it’s going to be very difficult for me to help you. There could be many many factors at play here. This is when you can use blueprint visual debugging.

While the project is running you can observe the blueprints working. It’s useful to have two monitors so you can play the project on one screen and have the blueprint you’re observing on the other screen.

The execution wires will pulse as they are executed, indicating where the flow of logic is going. Sometimes you don’t have access to another screen or need to examine in more detail. That’s where breakpoints come in.

You can right click on any node and add a breakpoint - or select the node and press f9. This will stop the code at that location and bring up the blueprint when the project is running and that node is executed. Then you can “step” over nodes one by one, observing them as you go.

Start with the beginning of the logic chain - in this case, the trigger event. I would add a breakpoint on the event begin overlap. If there is no breakpoint, you know it’s not reaching this point in the code, which means that either the actor’s collision or overlap settings are not correct.

Next, I’d look at the box trigger function at the end of this chain. If this fails, casting is failing. Then the box trigger function itself… Then the BTTask… Keep going down the chain of logic until you notice something behaving incorrectly.

I know this sounds tedious, but again there’s little I can do to help without having access to your project.

Please let me know if you find out specifically what is failing so I can assist further.

Happy developing,

Reishi