I’m working on a school project and can launch dedicated servers on a VM (main game world launched manually on one port and dungeon servers spool up on-demand with incrementing port numbers). Players can travel to the new dungeon server and back to the main server with no problem.
My issue is that when the last player leaves the dedicated dungeon server, I want the server to shut down as if the dungeon were completed and is no longer needed. I can either…
- Shut down the server after sending all but the last player back to the main server. (sends that final player back to the main menu because its client travel command is not accepted after the shutdown command is given, which is not optimal)
- Send all players back to the main dedicated server but can’t shut down the server because no one is left on it to send the command. “FGenericPlatformMisc::RequestExit(true/false);”
Short of creating some sort of web backend, is there a way for that final player to reach back into the dedicated server with no players on it and send a shutdown command?