Concept behind Pre-game and post-game sections?

Hello there,

I’m working on a very simple multiplayer game. Where 4 players spawn i a map, and fend off waves of enemies. But I want to setup my game like so:

  1. Server hosts and opens a level. (Opens a UMG widget where he chooses his guns and character)
  2. Clients connect, load the level and open the same UMG widget (which shows all players, and their guns)
  3. Everyone hits ready.
  4. Server clicks play and UMG dissappears and players start playing.
  5. When all enemies are killed, a Summary screen appears and shows stats per player.

What I don’t ask
So I’m not asking you how to do the UMG’s, replication and all that stuff

What I am asking
Are there any functions where I can do all this stuff. Like Pre-BeginPlay() or something like that? Where do I call the weapon setup screen and when the summary screen?

Not really. What we do in our own games if we need that kind of thing is BeginPlay is just ignored when it comes to gameplay. It’s used as a signal, but it’s not the real start. Even on a simple FPS, it wouldn’t be the real begin play, because there’s normally that 3…2…1…GO! style countdown before the real game starts. So my advice would be to just have the server/gamestate/gamemode manage the real state of the game, and when has play truly started. You can then add your own replicated events when you detect everything is good to go, and emit the replicated “RealGameStarted”, and similarly when all enemies are dead you’d send out a RealGameEnded event so all the clients are on the same page, and each popup their summary screens.

Thank you. That cleared out things for me.