I’m unable to spawn the second player in the template of FPS (This makes debugging from editor impossible unless)
We investigated the issue and noticed that the second client is always spawned on the same location of the first. This means that the initial spawn collision fails and therefor the player is stuck in an unspawned state. (eg. changing collision on the character from “Pawn” to “NoCollision” lets both spawn in the same location)
It does not matter how many PlayerStarts you add, it will always pick the first for all clients, therefore failing the spawn on the client.
I created a project using the FPS template and start a game from the editor (or 2 batch files) while there is one or more playerstarts in the example_map level. The host spawns, the client is stuck with a static view of the level (eg. pawn did not spawn) checking the log it displays that it could not find a player start.
Go into the advanced settings of the play dropdown menu, in there you should see a notification for number of players. is the exact steps I took to make an 8 person blank level:
Open ShooterGame
Open new level
Expand basic floor to (3,3,1) in scale
Create 8 player spawn nodes
Go to the play dropdown menu, select 8 for number of players
Hit play in editor.
Please try this and let me know if it works. Thank you!
The current implementation always picks the first PlayerStart regardless of how many there are and if they’re free.
So each time you play with more than one player, the server will spawn, and then clients will be stuck as spectators because they couldn’t be spawned at the player start as the server pawn is there already.
So to test, you have to move the server pawn forward, then type “StartFire” in the console on the client. This has to be done for each client that needs to spawn.
Yeah perhaps it works in the ShooterExample because they override the ChoosePlayerStart function. I think the default implementation is what’s causing the issue. Very annoying.
I ported the ChoosePlayerStart code from ShooterGame and this solved exactly the issue I’ve been seeing. I think this code should exist in the base AGameCode so people can run local multiplayer out of the box.