For anyone new to the channel, this is a special place... you truly wont find anyone on CZcams giving this level of detail on UE multiplayer anywhere. I've searched every UE channel I can find, and this is the greener grass you've been looking for.
I want to shake your hand, this video helped me so much and i will defenitly be subscribing. Your explanations are detailed and to the point. Keep up the great work. :)
@Nocna Klacz cry more lol, make tutorials nobody wants to download. Use tags and work harder don’t complain, grind harder. Looks like you’re just starting out dog
I absolutely love your videos and the way you explain everything in detail. It's extremely helpful. Thank you! ^_^ do you think you could do a series about implementing a multiplayer inventory system? So each player has their own unique inventory, chests in the world have inventory slots that all players can see and edit, and when you drop or transfer items it's replicated so its the same for all the players in the world?
Can you please create a tutorial on how to replicate a nickname properly, I know is the same process of what you did here using the game state class, all tutorials I can find are just about creating custom events to replicate the nickname, but that does not consider late joined clients and is not properly. What I do is to store the name in the game instance because I get the username from another map (login). But I see that I need my own game state class to change the Player name, and getting each client's game instance class when the logic starts with the event "OnPostLogin" to change the 3d widget component is the part I don't fully control.
Can you add a step for letting players name themselves on this list? I've found many tutorials of creating name tag widgets, but not in a multiplayer list.
This seems to only work for me when you set the 'create wb player list widget - add to viewport' nodes in the event begin play in the playercontroller, when I try to input it as 'Tab- pressed - >create widget..... etc' it only works if I hit TAB before everyone joins. if I close the widget it goes blank, and if I open it after the other players join, it's also blank.
Player Array from the gamestate is nice, but seems unreliable as an array. I've had clients join out of order and whatnot. Makes it kinda' hard to rely on that particular node as a source for player list. At least when using in conjunction with the index.
How to do this with Player created names? Such as when they save a struct to a save game and load it on the player state. I thought I'd be able to call this updated player name variable, from the gamestate. (by having players save their player saved name to an Array inside the gamestate), but I haven't been able to do this. Perhaps this method in your video, doesn't work with seamless travel, as they're already added to the player array?
I would also like to know how to set this so it uses player name that has been set from a widget instead of the player computer name or steam or EOS name.
In fact, what you're saying is right. I had to add 'AllPlayerStates' so the system would recognize the array as updated with the IDs for each player's position on the list. I was experiencing that if I was on client 2, its index was 0, when in reality it should be 1. In other words, only client 1 had the correct order, and by adding AllPlayerStates, this gets fixed.
Does this still work? Following this exactly is not working for me. In the onrepnotify function, I am printing a string and it's not even printing the string I am telling it to.
just curious if I could use this method to create all clients mini-map? the issues I met is when play in editor (listen server) everything seem fine, but after package with development, only host showed the correct map widget, all clients map became white images.
I followed this tutorial and it worked flawlessly, however I closed the project last night and upon reopening this morning I now get the error: "Only Local Player Controllers can be assigned to widgets. BP_My_Player_Controller_c_1 is not a Local Player Controller". I'm not sure what changed, or what I may have accidentally clicked, any help @Kekdot?
I added an "is local player controller" branch at begin play on the Player controller, and this seems to have fixed it? Not sure if that was the correct way to do it but it seems to work now
Thats the correct way to do it. As the UI only exists locally, you’ll always want to create UI only on the Local version of your player controller. (Player controllers exist both on the Server and Owning Client)
is it possible to instead of having players all go into single player list but have cards added to another pane IE if players state is has red team true then add player to red team player list and if player state is set to blue team then add player to blue team player list?? been going crazy this week trying to get it working but it only ever works on host but not when I do it on clients from the for each Loop I am going a branch on the playerstate and if player state is true having it add to one list and if false add to the other team list but its only working on the host not the clients if I add branch on.
If I tried to do a similar thing but wanting to show all actor instances of a actor class would that work? If you can or need more explanation I'd love to discuss it. Im trying to basically set up a teleporter you can place in game and then open a widget to then select which one you'd like to teleport to as of rn I link them by saying one is a entrance and the other a exit (boolean) and then using a Id number (integer) but I'd really prefer to avoid all of that and just select the teleporter instance through the game.
"LogGameState: Error: Mixing AGameState with AGameModeBase is not compatible. Change AGameModeBase subclass (MyGameModeC) to derive from AGameMode, or make both derive from Base"
Would using an array position of zero to determine host create a problem in lobby migration after original host leaves? (I have not worked on implementing Multiplayer yet and just thinking about it based on what I have read on EOS lobby documentation)
Well essentially the UE replication works on the listen server model (client-server), and not on peer-to-peer by default. What that means is that if the host leaves, the session will simply be closed. It does not function in a way that the session will find/determine a new host and make that player host the session. So your concerns will never be the case since that can simply not occur. You would need to have different session functionality where in you would be able to pass a session to a connected client in case the host (server) leaves the game.
If you would have this custom logic however, (Self made or perhaps EOS supplies this logic, not sure, I myself use Steam and not EOS), then you would essentially have some logic with which you would determine which client will be the next host (perhaps based on who has the best ping, that is how COD lobbies worked back in the days), then when determining the next host, you could simply insert that host in the 0 index in the array. (An Array insert that is called). And that would basically fix it. But like I said, as far as I know, when a host disconnects the session simply closes with default Unreal Engine functionality.
We do use it, when kicking the player. Check near the end of the video. Besides that it’s nice for the GameMode to have a reference of all the player controllers for further down the road logic when it wishes to communicate with them.
@@Kekdot Oh i see, I should've observed more. My fault, just wanted to see how the player list syncing worked and ignored the kicking part, my bad. Thanks for the video.
Server can replicate the lobby list to other players. But I'm having trouble setting this up with custom names set in a player profile from players save games/player instances
@@ttv_mrjack6749 In my lobby I'm using a struct var in the player controller to hold all this data. Then the game mode collects all the structs into an array and sends the array back to each controller to then push to hud which pushes to the lobby gui, generating a player card for each struct. The method I followed is in Ryan Laley's Online Sessions Tutorials.
@@arthurspears8477 I just followed his method but it doesn’t work for the clients, it does create a lobby widget but the children don’t work, it didn’t even work in his own tutorial
@@ttv_mrjack6749 hmm, works with my clients. I have some client side bugs with the lobby widget but the player cards correctly show ready up and player name as fetched from the player state.
@@ttv_mrjack6749 I should add that I didn't use a separate widget for client and server, I just made one that checks if it's a server and does things slightly differently if it is.
Hey guys,
👨🏫 My Patreon link:
www.patreon.com/kekdot
Download Project Files | Premium Tutorials | Courses
💦 Get our Game on Steam | Kekdot Center:
store.steampowered.com/app/1487180/Kekdot_Center/
For anyone new to the channel, this is a special place... you truly wont find anyone on CZcams giving this level of detail on UE multiplayer anywhere. I've searched every UE channel I can find, and this is the greener grass you've been looking for.
I want to shake your hand, this video helped me so much and i will defenitly be subscribing. Your explanations are detailed and to the point. Keep up the great work. :)
Underrated channel
@Nocna Klacz cry more lol, make tutorials nobody wants to download. Use tags and work harder don’t complain, grind harder. Looks like you’re just starting out dog
I absolutely love your videos and the way you explain everything in detail. It's extremely helpful. Thank you! ^_^ do you think you could do a series about implementing a multiplayer inventory system? So each player has their own unique inventory, chests in the world have inventory slots that all players can see and edit, and when you drop or transfer items it's replicated so its the same for all the players in the world?
Finally, with your video i managed to get it, thank you!
Amazing video as usual. Would you implement a 'ready' status/ready button on this player list in another video? It would be nice
Great idea! I'll make a seperate straight to the point Ready Up Lobby system tutorial as one of the next video's 👍
Great tutorial! Would be awesome to have a color/team selection and use that level as a lobby with that UI list.
Up next in next week’s video!
Looking forward to it! 🤓
@@Kekdot Was this video ever made? There is literally NOTHING online about this sort of thing. We really need it.
No I stopped making tutorials around that time sorry. I’m really busy now with other projects but would love to continue with tutorials some day
you're amazing!
would love to see a tut on showing how to have two different lists based on player team, this was a great tut tho!
Really useful, thanks for sharing!
Awesome! Your content is very helpful
Can you please create a tutorial on how to replicate a nickname properly, I know is the same process of what you did here using the game state class, all tutorials I can find are just about creating custom events to replicate the nickname, but that does not consider late joined clients and is not properly.
What I do is to store the name in the game instance because I get the username from another map (login). But I see that I need my own game state class to change the Player name, and getting each client's game instance class when the logic starts with the event "OnPostLogin" to change the 3d widget component is the part I don't fully control.
Can you add a step for letting players name themselves on this list? I've found many tutorials of creating name tag widgets, but not in a multiplayer list.
@19:50 Is there a way to change the Player Name? I'd like for the displayed name be a username instead of the PC name.
This seems to only work for me when you set the 'create wb player list widget - add to viewport' nodes in the event begin play in the playercontroller, when I try to input it as 'Tab- pressed - >create widget..... etc' it only works if I hit TAB before everyone joins. if I close the widget it goes blank, and if I open it after the other players join, it's also blank.
Me has dado mucha claridad de lo que estaba haciendo mal. Gracias.
Player Array from the gamestate is nice, but seems unreliable as an array. I've had clients join out of order and whatnot. Makes it kinda' hard to rely on that particular node as a source for player list. At least when using in conjunction with the index.
How to do this with Player created names? Such as when they save a struct to a save game and load it on the player state.
I thought I'd be able to call this updated player name variable, from the gamestate. (by having players save their player saved name to an Array inside the gamestate), but I haven't been able to do this.
Perhaps this method in your video, doesn't work with seamless travel, as they're already added to the player array?
I would also like to know how to set this so it uses player name that has been set from a widget instead of the player computer name or steam or EOS name.
Hi, with MyGameState sometimes you shouldn't take a replicated PlayerArray? 19:41
In fact, what you're saying is right. I had to add 'AllPlayerStates' so the system would recognize the array as updated with the IDs for each player's position on the list. I was experiencing that if I was on client 2, its index was 0, when in reality it should be 1. In other words, only client 1 had the correct order, and by adding AllPlayerStates, this gets fixed.
BIG THANKS!
Does this still work? Following this exactly is not working for me. In the onrepnotify function, I am printing a string and it's not even printing the string I am telling it to.
just curious if I could use this method to create all clients mini-map? the issues I met is when play in editor (listen server) everything seem fine, but after package with development, only host showed the correct map widget, all clients map became white images.
I followed this tutorial and it worked flawlessly, however I closed the project last night and upon reopening this morning I now get the error: "Only Local Player Controllers can be assigned to widgets. BP_My_Player_Controller_c_1 is not a Local Player Controller". I'm not sure what changed, or what I may have accidentally clicked, any help @Kekdot?
I added an "is local player controller" branch at begin play on the Player controller, and this seems to have fixed it? Not sure if that was the correct way to do it but it seems to work now
Thats the correct way to do it. As the UI only exists locally, you’ll always want to create UI only on the Local version of your player controller. (Player controllers exist both on the Server and Owning Client)
@@Kekdot Thanks! Love this channel by the way, most underrated gem on CZcams for UE Tutorials and help.
is it possible to instead of having players all go into single player list but have cards added to another pane IE if players state is has red team true then add player to red team player list and if player state is set to blue team then add player to blue team player list?? been going crazy this week trying to get it working but it only ever works on host but not when I do it on clients from the for each Loop I am going a branch on the playerstate and if player state is true having it add to one list and if false add to the other team list but its only working on the host not the clients if I add branch on.
If I tried to do a similar thing but wanting to show all actor instances of a actor class would that work? If you can or need more explanation I'd love to discuss it. Im trying to basically set up a teleporter you can place in game and then open a widget to then select which one you'd like to teleport to as of rn I link them by saying one is a entrance and the other a exit (boolean) and then using a Id number (integer) but I'd really prefer to avoid all of that and just select the teleporter instance through the game.
"LogGameState: Error: Mixing AGameState with AGameModeBase is not compatible. Change AGameModeBase subclass (MyGameModeC) to derive from AGameMode, or make both derive from Base"
Yeah, simply do exactly as it says.
Use the GameMode class instead of GameModeBase which is intended for singleplayer games.
Would using an array position of zero to determine host create a problem in lobby migration after original host leaves? (I have not worked on implementing Multiplayer yet and just thinking about it based on what I have read on EOS lobby documentation)
Well essentially the UE replication works on the listen server model (client-server), and not on peer-to-peer by default.
What that means is that if the host leaves, the session will simply be closed. It does not function in a way that the session will find/determine a new host and make that player host the session.
So your concerns will never be the case since that can simply not occur.
You would need to have different session functionality where in you would be able to pass a session to a connected client in case the host (server) leaves the game.
If you would have this custom logic however, (Self made or perhaps EOS supplies this logic, not sure, I myself use Steam and not EOS), then you would essentially have some logic with which you would determine which client will be the next host (perhaps based on who has the best ping, that is how COD lobbies worked back in the days), then when determining the next host, you could simply insert that host in the 0 index in the array. (An Array insert that is called). And that would basically fix it. But like I said, as far as I know, when a host disconnects the session simply closes with default Unreal Engine functionality.
I notice we dont utilize the array of player controllers we add and remove during log in and log out, what could we use that array for?
We do use it, when kicking the player. Check near the end of the video.
Besides that it’s nice for the GameMode to have a reference of all the player controllers for further down the road logic when it wishes to communicate with them.
@@Kekdot Oh i see, I should've observed more. My fault, just wanted to see how the player list syncing worked and ignored the kicking part, my bad.
Thanks for the video.
Since we can only get game state from server, this only works on host?
Server can replicate the lobby list to other players. But I'm having trouble setting this up with custom names set in a player profile from players save games/player instances
@@ttv_mrjack6749 In my lobby I'm using a struct var in the player controller to hold all this data. Then the game mode collects all the structs into an array and sends the array back to each controller to then push to hud which pushes to the lobby gui, generating a player card for each struct. The method I followed is in Ryan Laley's Online Sessions Tutorials.
@@arthurspears8477 I just followed his method but it doesn’t work for the clients, it does create a lobby widget but the children don’t work, it didn’t even work in his own tutorial
@@ttv_mrjack6749 hmm, works with my clients. I have some client side bugs with the lobby widget but the player cards correctly show ready up and player name as fetched from the player state.
@@ttv_mrjack6749 I should add that I didn't use a separate widget for client and server, I just made one that checks if it's a server and does things slightly differently if it is.
Had me up to the 25 min mark then ya lost me. plz slow down your talking so fast man