I have a script that does this. Using it for "rooms".
Make the door static and use this script as the main. Make sure you have the corresponding OUT teleports near each door. (specify name in "ifused section"
;Artificial Intelligence Script
;Header
desc = Instance Switch (activate upon use)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=60:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=60,plrusingaction=1:state=1,setframe=0,plrsound=audiobank\ww2\scenery\doors\open,plrmoveifused
:state=1:incframe=0
:state=1,frameatend=0:state=2
:state=2,plrusingaction=0:state=4
:state=4:decframe=0
:state=4,frameatstart=0:state=5,setframe=0
:state=5:state=10
;End of Script