Hello again!

This time I struggle with variable verification.
On the scene I have:
- Point A which is in the center of the scene.
- Points B, C, D, E and they are located from different sides of the point A.
- Layout looks like:
B
|
C-A-D
|
E
At the start I am standing at point A.
I can't go to E because door is closed. Of course, the door is imaginary.
I have to go to B, then I get a key that will open this door.
Moving the player to point B, I would give it a value in a global variable.
Then when I am going back to point A would check it and, if appropriate value then I can go to the point E.
I do not know what actions to do so.
I ask for any hints.