Is player controller necessary for pawn?

if player controller is necessary for movement of pawn then how many player controller can i have in the level and if i can have more than one player controller then which of these will receive my input.ex-i have 4 player controller in the level and each of those control their respective pawns and input handling of those pawns is coded in their respective player controller and all the control keys and logic is same. now when i press any bind key then which will respond to my input.

Normally to get inputs to playercontrollers higher than 0, you have to plug in another physical controller.

Whichever pawn is possessed by a playercontroller will receive that playercontroller’s inputs.
Mouse and keyboard inputs always belong to player 0.

You can change a controller’s possession to a different pawn at any time.
A pawn can be possessed by an AI controller instead, or not be possessed at all.

You can take the inputs on a playercontroller and have it call functions on pawns that it does not possess, to make them move and do stuff, too. I have done this in order to make it so other local players besides player 0 can be controlled by keyboard or mouse, although I bet there is a better way.

if you can control pawns which are not in possession then whats the point possession? why should i posses a pawn and why those functions need to be issued from the playercontroller can’t any actor can receive user’s input signal and call those functions present in the pawn.

If you want to do it that way, but I think you’ll find that possession and input mapping is easier for most kinds of games, and eliminates a lot of mistakes that are easy to make.

Plus you get the benefit of the Pawn being conceptually owned by a player and all the variables that go with it, instead of trying to figure out “Who hit me?” or “Who pulled that level?” the game already knows because the pawn knows who its controller is and the controller knows who its pawn is, therefore the whole game knows which pawn belongs to which player and it makes a lot of things much easier.

I have heard that Objects of “Pawn” and “Character” classes only receive Input events if they are being possessed by a "PlayerController"pawn class needs to be possessed by player.if that’s true then how you had controlled the other pawn objects by calling functions?

Good question! I in fact did do that with CharacterPawns, and I did it by passing the input axis values through a custom Event in the other pawn’s PlayerController which then called the Add Input Movement function or the Set Control Rotation function of the playercontroller, which the CharacterPawn then used in its movement and network prediction, smoothing, and replication functions (but I don’t have to worry about those, as they happen under the hood).

ok that means you have assigned controllers to those pawns as well?

Yes even though I can control them with player 0, because the playercontroller knows which playerstate it belongs to and that is where I store the score, health, etc. to make sure those things replicate properly in a network game. playercontrollers own the network connection but are not themselves replicated in the way you would think, so for me it is necessary to use pawns, playercontrollers, AND playerstates to get everything communicating properly, because I am combining local multiplayer on splitscreen with networked multiplayer.