Download

Need Help Making Simple Key And Locked Door Blueprint

Hello,
I don’t know if this is the right place to ask this question but I need help with this blueprint to unlock a door with a key. As shown below I have the blueprint of the key to where when you collide with it, it will destroy the key and set “has key” to true. What I want to do is make it so it’s the same thing but instead, you press E to pick up the key and when you pick it up it says “picked up key”. So basically how do I recreate this blueprint I have but make it only pick up if you press E.
Now for the door. The blueprint I have is when you enter the trigger and press E it opens/ closes how do I make a blueprint where when you start it is locked “when you press E on it, it says Locked” when you pick up the key and “has key” variable is set to true it will open the door then.
Yes, I know there are tutorials and other posts on this but none of them helped me. And I am new to blueprints so If you just type an answer I won’t understand it so could you send a screenshot of what the blueprint should look like?
Thanks!

Hi there,

For picking up the key, I would check for an overlap with the key in your player character blueprint, and then when you press E you can check to make sure your character is overlapping the key. If the character is overlapping the key, change the boolean HasKey to True.

Now for the door, for the actual opening / closing of the door, just add a branch from the BeginOverlap node which checks the HasKey boolean from your player character blueprint. To display a message on screen, you will need to use a UMG Widget.

The above is very high level, but should set you on the right path.

Any problems, let me know.