How do I make a door open and close by pressing "E"

I’m doing a project, and it needs to open and close a door by pressing one button has a tutorial on Advanced Blueprint to motra this, just as door opens automatically when you approach trigger. I wanted her to open and Close curly when you press button “E” for example.
Anyone know how I could add a key that blueprint to activate animation?
Thanks!! ^^

Hey

You can do a single line trace for objects and check for a hit on door, if hit is valid you can call a function to open door… just replace OnComponentBeginOverlap with event when interacting with door. I recommend you check out this tutorial Multiplayer Interaction System in Blueprint - Tom Looman

I hope this makes sense :slight_smile:

You could also make overlap do a bool check and enable E input when bool is true( player is in trigger box close enough to open door)

You should also add a Flip Flop and set a Boolean variable (Open = True/False) to true or false and then play correct animation

I’m sorry but I still do not understand, would you make some prints of this example?, would you make some prints of this example?

There’s a pretty good discussion on making a door open using Blueprints here:

It also uses E key to open door using door’s Blueprint, as you can see in this image from that post:


That post can also help you get door to push character, if you need that functionality, but there’s plenty of information there for simply getting it to open with E key.

Hope that helps! Let me know if you have more questions on setting something like this up.

Thanks!! That’s it! Any other questions I come here to ask you lol

Great answer! I just have one question, how would you do this in multiplayer?

no rotate link option in my timeline

need a popup msg with “PRESS E TO OPEN” if player in trigger boxI have class blueprint with a door open/close
sorry for bad english

I have very little knowledge of what this stuff is but can you explain what each one of those nodes are? I’m looking at documentation but it’s not helpful as nothing is obvious. There’s like no list of where to find OnComponentBeginOverlap(Trigger). I really need your help.