Entering door on input (paper2d)

Hi, I’m having trouble figuring out how I enter a door which opens a new map/room in a paper2d environment by pressing a key. I can enter the doorway if I overlap, but I only want to enter the doorway if I press a key while standing in front of it.

Hello JumpinDownaHole,

From the way you describe it, you don’t need the door to open, but you want it to move you to another level. If that is the case, you should be able to set a trigger box and a boolean inside of the character’s BP to do this for you.

The first step is to place the trigger box in front of the doorway and then make it into a blueprint. After that, you can use an “On Begin Overlap” event in the Event Graph to do a “Get Overlapping Actors”, cast to your character’s BP class, and then set the boolean that you created to true. After that, set up the input that you wish to use to move to the next level to check to see if that boolean is true or false. If it is true, have it move to the next level and set the boolean back to false. You’ll also want to set up an OnEndOverlap for the trigger box to set that boolean back to false as well.

Please let me know if you have any questions.

Thanks , that works perfectly. I didn’t know about trigger boxes at all…