r/UnrealEngine5 • u/LarryismTV • 2d ago
Need help // Networking & Spawning
Hi there!
I'm Larry, 35 and from the Netherlands.
I recently started to play around with Unreal Engine, been building a little project mainly to play on the couch here with friends, but I wanna add LAN capabilities for future LAN Parties & Virtual LAN in order to play test the multiplayer modes in the game.
I have successfully integrated a multiplayer/LAN/Steam system, so when i run the game twice, (in editor/PIE or packaged game) successfully connect both games to a lobby (1 is host & 1 is client) and start the game, the problem begins.
When i start the session its loads into my level, but only the clientside instance of the game is spawning in. The host isn't, but the level is loaded on both game instances. just the client side spawns a character..
I've been trying to wrap my head around this, and after 2 days of trying stuff, having depleted my logical thinking, roamed reddit/google, and asked GPT for guidance... I just have to admit i'm stuck and can't get it done.
So here i am, asking for help, hoping there is someone on this sub, who is willing to maybe check-in via discord or remote session to look at my blueprints and help me out with this problem?
With kind regards,
1
u/Better-Maybe1813 1d ago
Hello, where does your spawn logic live?
If it's on OnPostLogin in the game mode, keep in mind seamless travel goes through a different path than a fresh login, so depending on how you travel from the lobby that event can end up skipped for someone. HandleStartingNewPlayer is called after login or after seamless travel, and it's what spawns the pawn by default, so moving your spawn there could be worth a try.
Also check the gameplay map's world settings, make sure the gamemode override is the one with your spawn code and not the lobby one.
For steam, testing needs two different steam accounts (so usually two pcs), but since the lobby already connects that's probably not the issue here.