Hello, I am trying to do a multiplayer game with a simple teleportation in it, when I run it in PIE, it works perfectly fine and the player gets teleported to the correct spot.
However, whenever I am running it on standalone (On steam on two different PCs), it will not teleport at all.
I have tried to add delays, I have tried different methods to make sure that the pawns are all possessed before I proceed, so it doesn’t fail due to that.
This is what my GameMode looks like, this is on PostLogLogin, taking the New player and gets the PlayerController from that and gives the PlayerSpot number based on the Length of the Array with BP_PlayerControllers, this should in theory get ran twice so the host should connect first and get 1 and the client second and get 2.
Lots of images, but I been struggling to get this to work reliably, or in fact, at all while playing StandAlone on Steam, so any sort of help would be very appreciated
Way over-complicated process here and there’s quite a few ooops in your code.
Do not run Delays in Macros or Functions. They will not allow the current tick to end until the function exits. Do event graph based polling instead.
Game State Player Array holds a copy of every player state, which has a reference to the player controller.
Create a JoinID (int) in the controller. Set it to replicate.
On Post Login → Set the Join ID, then Increment the GM’s count.
You can also create your very own custom spawn points and give each an Actor Tag ID. Then when you go to spawn players, which happens automatically in the GM on connection, Have the GM choose the spawn location actor based on its tag ID and the players joinID.
OR you can use a simple pawn class as the default pawn class (GM settings) and spawn the real class once the client has loaded the map. Thus destroying the simple pawn and replacing and possessing the main character at the right location.
Thank you for your reply, as I understood it, the Game State Play Array gets deleted and recreated whenever I do a Server Travel, as such, trying to hold onto a value from the lobby level, is impossible?
I am using an override for the Player Starts, but the issue is that triggers before the PostLogIn event, which means they havent been given their PlayerSpot integer yet. So it puts them at the default PlayerStart, hence the need for a secondary teleportation (Annoyingly).