Level Blueprint should set Variable to false?!?

I have a key event to open a door. For this, the player has to pick up the key. As soon as he has that, the variable: “HasKey” is true. Now it goes in because level blueprint there then the event Open door is fired as soon as it is in the trigger box. But how can I set now as soon as the door is open the “HasKey” is wrong?

powered by google translator

You sort of can with event dispatchers or through an interface. But you also shouldn’t. The Level blueprint is sort of meant to react to the world, not for you to interact with it.

The HasKey variable should be on your character. Maybe even on your PlayerController or GameMode.

I know new users think the Level Blueprint is like a central place to do stuff. but it really, really isn’t. It’s isn’t very flexible, and it’s not easy to access.

Also, the Door should be its own actor with the ability to open when a character with HasKey enters its volume.