AI won't move-to a target location, ONLY in 1+ Player(s) Net Mode: Play as Client

It works in standalone and in play as listen server, but not when I set the Net mode to Play as clients. The map has nav mesh, all the data seems right. But the AI won’t move. I don’t understand what’s wrong and where to look for bugs?

Play with 2 players, one as a listen server and one as a client, see if only the client has the issue and the listen server seems the AI moving.

In Play As Listen Server with 2 players, it works well. They both can trigger and make the AI NPC to flee. It’s only in 2 only clients mode the ai won’t move. The params appear fine. Here’s a screenshot from 1 Play as Client.

15

It’s hard to tell without seeing some code. In dedicated server mode what do you see in the behavior tree, where is the AI stuck ? I would investigate that part of the behavior tree, what triggers the AI to flee and why it’s not fleeing, you have to debug the code, add some prints etc.

THe hearing and sight sense execute that piece of code. It gets stuck on the MoveTo in BT even-though the actor and its location are valid.

I got the same problem and found your post.
After more research and tracing the code, the problem for me was the CharacterMovementComponent of the AI not ticking on dedicated server, the kind of server that is started in the background when you launch as Client.
The flag that was off is hidden in advanced and called bAllowTickOnDedicatedServer
image
I hope this might help you and others seeing this thread

1 Like