How to make AI Character move with multiplayer using w,s,a,d?

Here is the deal.
Top down multiplayer game with Player Controller possessing a viewing pawn.
Actual player character are possessed by AI.
want to using w, s, a, d buttons to move that player character possessed by AI.
RPCs causes crazy jitter.

Thanks for the help, but still, what I want to achieve is Startcraft II, Warcraft III or Dota2 like behavior, but with joystick or w,s,a,d to control their movement, with multiplayer enabled.
I imagine there will be an AI controller and behavior tree to control them, but prioritize player input when there is any. I am able to achieve that with any action input binding(jumping for example is fine), problems is the movement component replicates based on network Roles, the character is possessed by AI, so role is simulatedProxy, which will not replicate the same as a character directly possessed by a playerController (autonomousProxy). Or maybe there is a better way of doing this. Seems like the framework do not want you to mix AI and Player controller.

I will try switch controllers.

APawn can only be possessed by one controller at a time. Ensure your RPC’s handle changing between controls at the right time. Only pawns that possessed by a player controller will be able to respond to input. You’ll want to understand how behavior trees work to make the AI perform tasks to fit your needs.

Well, I got no luck, and feels I am fighting with the unreal framework again, I will explore other solutions, but for now, I will fall back to single Player controller possessing the player character without my viewing pawn, if I need to insert AI functionality, I can hack some dummy AI pawn I guess. I might have to dig dipper for the Movement Component if I need to really make it work with AI possessing it.

When an AI is performing actions on a pawn, be sure to do it on the server so it has authority. Then use multicast to push the changes to the client. Replicated movement component should handle movement on a nav mesh.

Sorry if I missed anything, problem is, I want to hold down w to trigger a move up, this will be a bind axis, so potentially an RPC per tick, not efficient and have jagging issues, when I look through the movement component, I see it is using a client-predict and server correction kinda way to smooth the movement, however, it only goes through this route when the Character is possessed by a playercontroller. I will probably have to read the movement component source code to see a solution.

After reviewing how you have replied, its clear you need to go back to the drawing board and take several steps back. Here is how I advise you to proceed.

  1. Start with a new third person BP template project, and change the number of player settings and set to play as listen server.

  2. Get character movement to replicate properly. (Just ensure actors and movement comp are replicated.)

  3. Then get the AI to follow the player, but have it work across the client and server. Once you understand how to get an AI to do something have it work for the client and server, you should be able to generalize that framework.

Sorry for necro but in case anyone runs into this issue because they need the charactermovement to have input without player possession…

I used the Find Path to Location Synchronously node
to get path points to the navigation target. I then have a HandleMove on the tick. There’s a gate that opens/closes based on if there are points left in the nav route, removing the point we moved towards if we enter the acceptable radius. It basically is AI Move To but it uses add movement input to mimic player input. Be warned that there is no fail branch in what I have posted. You should make sure that if we try to move towards a point for too long that it fails navigation and closes the gate.