a small question

i'm making a game and just wondering if there was any way that you could run a script so that if a player interacts with something, it exposes an exit?
I.E: Object: steel door
If opened: player can go north/east/south/west etc.

thank you for reading and if you how to do this then please tell me!
thank you,
Hello

Yes, add a script to the "open door" command and choose "create an exit" from the list of options.