Local Multiplayer - Multiple Players in one game instance

I am working on a local multiplayer game and I’d like to assign a controller to each player (think Super Smash Bros).
I’m getting a PlayerController in the characters Blueprint like this:

The player index is set in the editor for each player instance.

So far this is only working for Player0. I guess I need to instantiated multiple PlayerControllers? If yes, how would I go about doing that?

Hello Ira,

On the additional characters, you can set which player possess the character as well as define which input it auto receives input from.

On your character Blueprints under Pawn (set Auto Possess to something other than Player0 as that is the default pawn). Also set your Input’s Auto Receive Input to something other than Player0 (usually the same as the pawn that possess it).

Hope this helps!

-W

Hi Wes,

Thank you for your answer! While I feel like I’m getting closer to a solution, it doesn’t quite work yet. My set up looks like this now: -1 “CameraPawn” which gets possed by player0 and recieves no input (That way I have a static camera) -2 "CharacterPawn"s which don’t get possed and recieve input from player0 and player1 (I figured player indices correspond to gamepad indices, is that the case?)

This is not working at all (no character can move).

I feel like I haven’t gotten the hang of the Controller/Pawn architecture yet. Is there a place where I can read up on that?

For the camera, you could look here: Multiplayer shared camera - Cinematics & Media - Unreal Engine Forums

I can’t help with the players though as I haven’t got it working myself yet.

Hi, I thought I’d bump this because I’m having a very similar problem and it doesn’t look like it’s been answered anywhere else.

How can I manually assign a specific Gamepad to a specific Playercontroller?

That’s a nice question, I’m also interested in knowing how to do so. If it’s not possible yet it would be great if Epic could implement that soon.

any updates on this?

For now more than one local player creation and splitscreen stuff can only be done in C++, though that can change with UE4.1. Check out “CreatePlayer” function to spawn more than one player locally. You can then control the second one too if you have two supported gamepads like the X360 one.

When you call CreatePlayer the parameter you are specifying is which controller ID is assigned to that character. At run time you can change the value of the ControllerID on the ULocalPlayer to point it to a different input ID.

Edit: Aaaand I’m answering 2 week old questions … ah well, still just as true :wink:

How would I make it so, when someone joins the server, it goes into splitscreen? Also, can you elaborate on assigning specific controllers to specific playerIDs?