Sorry about the image dump. I’ve been messing with this for a while and I can’t manage to get the project to work with multiplayer.
A basic rundown of what’s happening is that I am able to create, see and join lobbies. But after joining, even though it shows as successful, it doesn’t send the client to the map the lobby is in.
The host is successfully transferring to a listen server and they both start as standalone. The lobby info is sent over the network, so I can view the ping and the lobby name in-game. But I can’t join even though it returns as successful.
The “Player Index” value refers to an index in an array of joined players.
0 → Player 1
1 → Player 2
2 → Player 3
3 → Player 4
On Clients Index 0 refers to themselves in all cases/scenarios.
On Dedicated Server, Index 0 ALWAYS refers to the first player.
On Listen Server, Index 0 ALWAYS refers to the HOST… the server itself.
FYI, Player UI should ALWAYS be handled by the controller class. Widget Creation, adding to view port etc.
To get a Controller reference from UI you use Get Owning Player. This will return a generic player controller reference.
On clicked -> Get Owning Player...
All your Session logic should be called from the Controller class itself. In the UI you’d use a BP Interface call on the generic controller reference.
@Rev0verDrive I tried your fix, but unfortunately I’m still getting the same result — I can’t join.
(My code is similar to the original poster’s.)
Does the player index matter in this case? When we find and join a session, we aren’t connected to any host yet, so index 0 should always refer to the current player controller.