Why is my AI only patrolling and not detecting the player?

Hello

I’m trying to setup some simple AI, so I followed this tutorial:

But my AI is only patrolling, it never seems to find the player…

Inside my BTS Detect Enemies blueprint it never active attack/chase…

The first screenshot the player is in front of the AI… Second is when AI patrols…

Can anyone help me?

No one know how to fix or can provide a working sample?

IT seems that the enemy detection is breaking on reading “enemy actor” key value from the blackboard. Do you set this BB key value somewhere?

As a side node, you can always put a break point on any blueprint node, and once the execution breaks on that node mouse over pins to read their current values.

Let me know if you have any more questions.

–mieszko

Hi I’m Roy I would give you a tutorial.
Are you using Navmesh?

Looks like switching browsers worked. Here’s what I have (5 shots total):

I followed the same tutorial and had some issues myself. When I started, I had never seen, much less used, a behavior tree before. I did manage to get enough out of the tutorial that I was able to rework a good bit of it, and I got a working setup now. I can’t guarantee this will work for you, or that it’s even the right way, but it works… I made some screenshots, but I’m not sure how many I can attach to a post, so this may be multiple posts :slight_smile:

hmmm… seems I can’t post pics at the moment :frowning: I’ll keep trying… In the meantime, I created a zip of the screenshots and put them on my dropbox: BehaviorTreeService.zip

I just realized that I’m using a library function I made to check line of sight, so to be complete:

Hey Guys Whats Up,

I’m including the updated A.I. Project from the tutorial above here for you. It also includes Owen shooting.

Thanks,
Peter

Thanks for the offer Roy, But with samples and images the other nice people have provided, I think I got enough to start experimenting with AI…

Thanks…

I will try to look at my BB files and see if I can spot my mistake…

Cool thanks… Definitely very useful…

Thank you so much for uploading…

And great work on the tutorial, even though I manged to mess up somewhere :slight_smile:

I will play around with it and see if add some more functions to the AI…

Hi, Here are some video tutorials of AI system implementation
UE4 AI System implementation

I will be updating the list.

UE4 AI System Implementation, I will be updating the tutorials. CLICK the link!!!

Man, i’m having exactly the same problem after so long. Did you solve it? If then, how? I just don’t know what else to do :frowning: