I have 1 problem with creating algorithm

I know how make door opens, when pawn overlaps its collision, but i can’t create algorithm, which makes door opens, when pawn overlaps door’s collision and n-key working(i binded e key). At first, i don’t know, when editor must start checking collisions

Add a sphere component to your character. Add the E event to the blueprint, and then check what actors are overlapping. If there’s a door, open it.

i know, how check ovelap, but i dont know, how use this with key. For example, i overlap door collision and there will letter like “press e to open door”, and when i pessing e, door opens. Also i forgot say, that i use C++

On the sphere component on your character, bind the begin overlap event. On overlap, if the other actor has a class door (or even better, uses an interface), display that text to screen and save that actor as a variable.

When you press E, check if that variable is valid. If it is, call the open function on it.