Multiple Player Controllers with Unique Focus?

I’m creating a menu where I want up to 4 local players to be able to have their own umg focus to select their own characters in a character select screen. I’ve got the focus navigation working through using getplayercontroller with the index at 0, but find that using 1, 2, or 3 only result in errors let alone allowing for multiple individual focus at the same time. Is there a solution to this?
Note, I’m only using blueprints.

Store the player controllers in an array. You can then access the array and ask whitch character they picked. Then draw the widget according to the character.

I used to do it this way. But it also depends on your character selection logic

Thanks for the response, but maybe I wasn’t specific enough or don’t understand what you mean but, if I change the index on player controller anything other than a 0 (1, 2 or 3 in this case) I get the “accessed none” error.
I’ve since used the ‘create player’ node first to create a second player (index 1) first then created the widgets to index 1, and while it doesn’t error still does not let that controller operate the widgets, while index 0 can. I think I’m probably missing something simple, but I don’t know what

Ok I think I know what you mean.

You dont have to set the index of a player controller. Let’s say you start the game as the host. So your player controller will have the index 0. The player that joins will then have 1, the player after that 2 and so on.

They were automatically created.
In you Gamemode you can create a veriable of type “Player Controller” (Array)
Then there is an Event called “on post login”. At this event, add the “New player” - Pin to your array. This way, you store the player controllers of joining players. You can then get the gamemode and access this array with an loop.

The second thing is: UI only draws on client. No matter what. So I like to create an client-event within the player controller whitch is in charge of creating the UI.

I don’t know if you did it already, but I recommend serveral Gamemodes and Player Controllers. E.g 1 for main menu, 1 for lobby and 1 for gameplay.

That does seem close, is this a method capable of recognising local controllers or is ‘EventOnPostLogin’ exclusively for online players? It only seems to recognise controller 0 as a login

It should also work with local controllers. (if you mean local multiplayer)

I use it at my game where you can choose between steam or LAN multiplayer and it works :slight_smile:

I’ve been able to add controllers to the index through the create player once more, otherwise it only adds player 0. But I’m unable to see how the index is useful as I can’t use it in the game mode settings, still only allowing player 0 to navigate the widgets. How did you implement it to do so?

Ok then use this one

(you don’t have to set the variable. I needed only 2 for testing)

Its really important that you use “Add Unique”. Because there should be one controller for each player.

“OnPostLogin” is the player joins and has given an player controller. But what you try to achive is one step before.

Okay I have done that, but yeah we’re getting away from the core component of my question, and I’m starting to think that any player other than 0 is unable to manipulate widgets at all. Even if I create a widget from controller 1 and all its unable to manipulate anything, while still 0 can, for some reason

He wants to make a local multiplayer game. without sessions or a server.

I faced this same scenario a time ago ( a 6 players game in the same screen/session) and this plugin solved my issue :slight_smile:

Hope it helps!!

good luck
Dany