Spawn in certain location after switching my level

So I have switching my level down, that is fine. I have tried after loading the new level, to auto teleport me, set actor location and whatnot, but whenever it loads the new level, it just doesn’t do anymore than that. Anybody have any ideas?

Basically it is just warp zones on a 2-d platformer. I guess if worse comes to worse, I can create it all on one level and just teleport to the different areas, but I really want to switch spawns for each level transition.

The easiest way is to put a PlayerStart actor where you would like to start the level. If that isn’t enough for your problem, could you explain a bit more, what would you like to achieve?

Picture waking down a hall and you trigger a door.lets call this side door 1A, and the other aide door 1B.
So 1A is on level 1. 1B is on level 2. I need to exit 1b and wind back at 1A, but also need there to be a 2a on level 1, that connects to 2b on level 2. Just those will be further down the level. It is for a 2-D game, I just cant seem to get him to not spawn at the player start. I tried loading the level from the door and then setting the player position, but it did not work.

I guess basically have me move from level 1, to level 2 through the related doorways, and multiple doorways

Almost every blueprint is destroyed when changing the level. Except the GameInstance,so you can store there which door you would like to reach at the next level. Then when the new map opens, search for all the PlayerStart and find the one with the display name of 2B, or whichever you want.

Gotcha. So would it be better for this 2-D level to all function in one level? Like, create a few different spaces around the world, never connecting and when I get to the warp area, set player position to the other area? So it is similar, but I just stay on one level ? Or would that be bad?

I don’t know which solution is better, but what I was trying to say is this: Before your exit a level, you store the next door’s name in the GameInstance in a string, like SetNextDoor(“2B”). Then when you open a new level, in the GameMode, override the function “ChoosePlayerStart”, to get the NextDoor string from the GameInstance and find the GameStart with this Display Name.

Okie dokie. I got what you’re saying. Imma try that when I get home! Thank you a lot for your help!

Okie dokie. I got what you’re saying. Imma try that when I get home! Thank you a lot for your help!

You wrote this twice :stuck_out_tongue: Any news about your progress?

I’d personally recommend enabling your character to be auto-possessed by Player 0 or whichever character you want, at start…

This way, rather than PlayerStarts objects, you shouldn’t have any issues upon spawning and you won’t have to rely on Blueprints or programming to start in the exact location you wish.

Hope that helps! I find the simpliest route to usually be the best.

  • Elisabeth

How would auto possess ensure that he could start the very same level from from different places?