Link a button to a door

Is there a way where i can have a button and link it to a specific door? This is probably a newbie question. I am new to game - making.

Sounds like you may want to use variables. What are you wanting to happen to the door when the button is pressed?

Open the door, that’s all. It would be nice to make levels if it was something easy.

You can use instance variables. If button A with instance variable X is touched, open door with instance variable X.

This way, you don’t have to make a new object for every different door. (That’s if you use more than one door in a level/scene)

And if you want to make a functional door create for example:

A door with frame 0 being the “closed door”. Add a custom collision mask to the this specific frame. (That means you have to disable the option "share this collision mask across all frames)

Then after the button is pressed, change the door animion to fee 1 (or whatever the last frame is for the door to be open.)
Then add a custom collision to this frame, where the collision would be out of the players way so that the player can move through.

I.e. If it’s a top down game and the wall is going down, the closed frame of the door would be vertical aswell. And if the door is opened, it would then be horizontal. So you just add custom collisions accordingly.

Or, if you could just remove the collision of the last frame (where the door is open) so the player won’t collide and can walk though.

Sorry if this is very confusing. I tried to explain the best I could without visual illustration. This is usually how I handle doors in GDevelop. Rotating is also a option but is just way more complex way of doing it.