How to Open Level and Set Player Position?

I’m working on a 2D sidescroller with different levels. I have created a save game system which allows me to save the position of the player and what level he is on.

When you load the game, the saved last level opens and the player is teleported to the saved location. It should be so.

Unfortunately, the player always starts at the Player Start object. If I do not open the level and only teleport the player, it works. But only if I start from this level.

Sorry for my bad English. I am happy if someone can help me. :slight_smile:

268257-4.png

There are 2 issues with your game calling Teleport event. First, when you load a level, your Pawn isn’t created yet. Second you are calling Teleport before GameMode’s InitStartSpot occurs which is responsible for choosing where PlayerStart and spawning your Pawn in its location.

Try moving your call to Teleport event during GameMode’s BeginPlay. That way, you’re sure that your Pawn is already created and spawned before teleporting him where he should be. You probably want to call Teleport when you know you loaded a level, so you may need some extra variables to take care of that.