Cannot switch game modes between levels

You need to define the game mode in the level settings for each level.

e.g.
Lvl-TDM, GM_TeamDeathmatch
Lvl-CTF, GM_CaptureFlag

When the level loads it reads the game mode from the settings and creates an instance of that mode.


Works correctly on my end.

image

image

image

image

In Lvl_CTF level blueprint I have the following:
image

In Lvl_TDM level blueprint I have the following:
image

In my character class, used for both levels, I have the following on Begin Play:
image

Tapping key 1 changes the map and the character prints the current game mode.


Optionally you can change the Game Mode for the given map with a parameter in the “Options”.

?game=/Game/Path-to-Gamemode/MyGameMode.MyGameMode_C

Downside is the new GM will use the previous GM’s character class and you will be forced to manually handle spawning.

1 Like