Change Specific Players Pawn at Spawn

I am new to multiplayer games and am working on one in blueprint but I am stumped on how to get this level started. Once people join a lobby level, the host will start the game and start a server travel into the level that I am working on. What I would like to happen is for one player to be chosen as the enemy, and spawn in as a different pawn and at a different location from everyone else. How do I do this? I don’t know how to make it so players spawn as a pawn other than the default one assigned in the game mode and I don’t know how to make it so it waits for all the players before spawning them (this is to make it so everyone has a chance of spawning as the enemy). Please help me figure out how to do this. Thanks! :smiley:

Hi Rymazon, since you are creating a multiplayer game I figure you have knowledge about Game Modes and Game State.

  1. I would create a “State Machine” and have Pre-, During-, Post- game states so I could define waht stae we are in so to speak.
  2. Second of all spawn all players as spectators and when they click ready you can make them spawn how ever you like when they are possesing their new player-pawn. This needs to be executed on the server.

This will allow you to configure your game in the Pre-game state when everyone is in spectator mode and force the to spawn to what ever you like when they have clicked ready and the match begins.

/J

Thanks for your answer and I like your idea. How would I be able to detect when everyone has finished the server travel so I can start the game and spawn everyone in immediately once this happens?

Check the function overrides in your game mode…
OnPostLogin or maybe OnPlayerRestart

You can do it the “dirty way” by Do Once that fire an event to the server saying “I AM ALIVE” in the clients tick… and when all clients have connected the start the game…