Multi̇player ai̇ follow nearest player

https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/index.html

The documentation follows just that, I don’t know about multiplayer but I’d start here.

Game development is about learning the basics, then building a game in your capabilities. And when you want to learn more, read tutorials, and the API. When you’re stuck on something that should work, but doesn’t… you come here.

To find the nearest player, you can either use a Pawn Sensor, or get a list of all actors of classes you want to follow, and subtract their World Location from yours to get a difference vector, Get Vector Length to get the distance. Then use a loop to figure out which Actor had the lowest distance.

Here is a good stream about AI from Epic. Getting Started with AI

Updated my answer with a link to a stream to help.

Those images are too small to read

BPs look good.

It sounds like the client isn’t replicating those variables that you’re stored in that macro.

I’m not familiar with multiplayer coding. You need to make sure that those values are stored serverside, where the client can access them.

you should delete this… Answers are only for answering, not replying

++++++++++++

Hİ I need basic Ai it should follow nearest player and work multiplayer ı waiting your answers. Thank you !

Ummm. I think you should first google this or take a course before you ask these types of questions. I know the answer but it is very hard to explain in text format.

İf its hard to explain can you make a project and I will download it. Because I alredy make search on google but I couldn’t make it.

Thank you for comment but I don’t understand english very well I still trying to make this but I stuckt and I don’t know what should I do.

201291-closest.png

One guy helped me for find closest character and distance this blueprint work perfectly but when I try to Ai move to :frowning:
Server follow fine but when he should follow client1 Ai going to in the middle on map

201292-kanvfnhr.png

201293-yqdoqc8r.jpg




Sorry :confused: