Play as a different player character on a different level

Hi when you go into your project settings you have to select a game mode that has things like player controller and player in default pawn class but what I want to do is change my default pawn class in game so if you are playing level 1 you are playing pawn1 and in level 2 you are playing pawn2. How would I do that?

each level has properties I think they are called “world settings” or what ever. there you can define which controller and char you want specific for the map youre playing

Your right I remember seeing the world settings before. I never thought of doing it that way. Hopefully it will work. Thanks.

Just checked it and the world settings stay the same level to level so it doesn’t work. Anyone have any other idea on how to do this?

Hey!

I made a little blueprint script for ya. Everytime you have a different level and it needs to have a new pawn, you just have to paste the below blueprint into the level blueprint.

Important notes:

  1. The node “Possess” is not visible normally. If you right click to find a node, you need to uncheck the box “Context Sensitive”.
  2. The blueprint is executed in the level blueprint in this example.
  3. I had a weird problem occur, but it only might be related to my engine version. When you start the level up for your first time and then play, you might end up not being able to move. When you go into your pawn blueprint and just click on compile, the pawn will be fixed again and will be able to be controlled. It is not a fault of my blueprint example though. Might be a bug of the Unreal Engine :/.

EDIT: To get the reference of your object in the world just left click in the “World Outliner” on your object, then go into your level blueprint. Right click in your level blueprint and you will find an option called Create a Reference to “YOUR OBJECT”.

Thats great thanks. I’ll try that :slight_smile: