How to make multiple keys connected to multiple doors

hello so i am trying to rush and make a game and i have no idea on how to make multiple doors connected to a key i want it to be flexable so i dont haft to make diffrent sprites and all that please help!!! ALSO I DONT HAVE A LOT OF TIME!!!

What do you mean when you say they are connected to a key? Does it mean that those doors can be opened with the same key? you can make them all respond to the same object (key). That will depend on how you program the game, if the doors, when you have a key and make contact with the door, open it, change the animation of the door, disappear, etc.
Something you can do is that if the doors have all the same characteristics and only the image is different, you can make a single door object and add an animation to it for each different door that will respond to that key. When placing doors in the game, you can manually change the animation number of each object and thus the image of each door, but it will still be the same door object and will still respond to the same key.

Ok what I mean is that if I have a key and a door I place them down I want those to be connected then i place another set down connected thats what i want but i have no idea how to

I’m assuming you mean in the editor, and not during game play. Add an Id as an object variable to the door and key sprites. Give the same id to a key and the door it can open. When the key is used, check that it’s Id variable matches the door’s Id variable.

MrMen I did it a little differently but I still can’t get the doors to open and close when:

  • collision.
  • when the “e” key is pressed.

I probably have a contradiction, but I can’t understand why what I did doesn’t work.

I have doors on a level. I want the player, when they get to a door and press the “e” button, to be able to first open the door and immediately close it again by pressing the “e” button.

Why doesn’t this work the way I did?
I have two animations in the sprite of the door “open” and “closed”.

Why doesn’t it work???

I’ve responded in the other post you have started.