Next time, don’t forget to comment on the answer, instead of creating a new answer ok?
So if you go to your GameMode blueprint, you can override the ChoosePlayerStart function by clicking this:
In that funcition you should do something like this:
So, just in case you don’t know what a PlayerStart is, it’s an actor you can place in your level that the GameMode will use to spawn the player. You can use as many as you want. In your case, you’d want two PlayerStarts, located next to the two different locations you want the player to spawn in. You would then use the integer you save in the GameInstance class to choose which of those to use in the ChoosePlayerStart function.
By the way, the GameInstance class is a class that will not change even when you open a new level, it will remain consistent from the point when you start the game until you exit the game, that’s why you have to save this integer in the GameInstance class.
If you haven’t created your own GameInstance class, do so, and remember to pick GameInstance as its parent.
After that, add an integer variable to it.
After that, go to your Project Settings → Project → Maps and Modes → GameInstance (at the end) and set it to your newly created GameInstance class.
Now, wherever you have the logic for your door, you can access the GameInstance class you created and modify the integer in that class, in order for the GameMode to know which PlayerStart to use when spawning the player.
If you’ve got any more questions let me know