Different Player Blueprint for Each Level?

Hey guys. How do I use a different player blueprint for each level in my game? I have a flashlight set up with my player on one level in my game, but I don’t want it in any other levels. How would I fix this? Thanks!

I’ve done some personal testing, and honestly, the easiest way to do this is with some casting to your Player Character blueprint class in the Level Blueprint with the Event BeginPlay, add the Flashlight Components to the Blueprint only when you start that level.


1 Like

Oh, wow. Little more complicated than I had hoped. Well, thanks. I will get back to you after I test this.

Cant you just set the level’s Gamemode to be different? So level A is GameMode_Flashlight. Level B is GameMode_NoFlashlight. GameMode_Flashlight default pawn is Player_Flashlight and GameMode_NoFlashlight default pawn is Player_NoFlashlight.

That should be simple enough.

How do I create the different gamemodes? I’m extremely new to UE4 (obviously), so I haven’t really learned how to do that yet.

You make them like you would a regular blueprint, just choose Game Mode as the parent class when you are creating it. After that, if you go to Window>World Settings, you can select the Game Mode you created, for that level.

If you open up the game mode, you can set default pawn etc. for any level using that game mode

You can also cast to the player character and change settings from the level blueprint…

The only correct way to have different Classes (for you that’s the PlayerClass) in different levels, is to use the GameModeClass.

Create a GameMode for each different PlayerClass and either fill the PlayerClass in on “DefaultPawnClass” or spawn it manually on BeginPlay
of the GameMode. I recommend to use the DefaultPawnClass, as this is easier for beginners.

To do this, open the newly made GameMode and go to the top and hit “Class Defaults”. Then you see something like this:

Here you can fill in the DefaultPawnClass.

Then open your first level and go to top bar and select “Blueprints”. Here you can set the BASE GameMode Class.

It will be used in ALL Levels from there on. If you look closely, you can see a tab beneath it called “World Override”.
Here you can select other GameModes for your second and third level.

So you save the first one, open the second one, create a new GameMode, fill in the Character Class and then go to Blueprints
and this time you don’t touch the “Project Settings” GameMode, but you override it with the “World Override” GameMode.
Just select the second GameMode and it should work.

Thanks so much! Works perfectly. Sorry I took so long to reply :stuck_out_tongue: