Switching levels when pressing a key

Hey, i´m new to unreal engine and i hope you can help me…

So i wanted to make a door that when you press the key E you are teleported to another level without the door opening.
i tried some stuff but it won´t teleport me.

I hope you understand me and could help me with that :smiley:

1 Like

What are you doing to make the teleport happen?

i don´t remember what i tried, but my idea was that when you are outside the house and go to the door and then press E to enter it, that you get loaded in another level which is basically the house from inside. And then when you are inside and press E again at the door, that you get loaded into youre normal level back again.
(i´m trying to make it look like a old ps1 game)
I hope you can help me with that

Nothing happened.
I´m a little bit new to this so i don´t really know how to create a door like this.
all i have right now is a normal door that opens, and i wanted to create another one which loads you into another level.
If hope you can help me with that.

When you hit E did you use the open level node and if so dose it just freeze or dose nothing happen

nothing happened.
I´m new to this and the thing i wanted to create is a door and you have two levels. (first level is outside a house where you can walk around the world, and in the second level you are inside the house)
When you are in the first level and press E at the door to enter the house, you will be loaded in the second level where you can either do some stuff inside the house or press E again at the door and it will load you in your normal world outside the house.

nothing happened.
I´m new to this and the thing i wanted to create is a door and you have two levels. (first level is outside a house where you can walk around the world, and in the second level you are inside the house)
When you are in the first level and press E at the door to enter the house, you will be loaded in the second level where you can either do some stuff inside the house or press E again at the door and it will load you in your normal world outside the house.

I’m supposing you’re familiarized with Blueprint scripting and Unreal Engine fundamentals.

  • Create a door Actor Blueprint. Customize it with meshes and materials as you like.

298662-doorbp.png

  • Add a Collision Box Component to your door Actor Blueprint and place It in front of the door static mesh. This box is the volume where the player Pawn has to be inside to enable the E key.

  • Add a Boolean variable to check if the player is inside the volume and a Name variable to store the target Level name. Also, check this actor to listen to inputs from player.

298666-anotacao-2020-03-28-142025.png

  • Add the Collision Box Component blueprint events to event graph to listen to Begin Overlap, End Overlap and E Key.

  • Add the door to world and set the level destination.

Be aware that this is just a simple and generic implementation and you may need to customize it to fit your project…

Thank you everything worked.

Have a nice day :smiley:

Hi, I’, trying to do something really similar in ue5.3 and it’s not working. It works in the viewport (“press M to go to level 2” works) but then when packaged, it just transports the player back to the start of the same level (level 1). Any other workarounds to accomplish the same task?

my idea was that when you are outside the house and go to the door and then press E to enter it, that you get loaded in another level which is basically the house from inside. And then when you are inside and press E again at the door,

Hey, could you check over if the level is set to the correct level? If so would you mind maybe adding a screenshot?
Good luck! :slight_smile: