I have an example for you. In this demo, I used the following:
* scifi segments
* scifi door (remote)
* switch4 (scifi wall furniture)
I construct the level, placing the door and a switch on each side of the door.
I move the mouse over the door and right click to access the properties. Here I put the name of the door and set the main script to "doorremote_autoclose.fpi".
The script for the door:
doorremote_autoclose.fpi
;Artificial Intelligence Script
;Header
desc = Remote Controlled Door (Open and Auto close)
;Triggers
:state=0,activated=1:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,anyfurther=75:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0
;End of Script
I place my switches, one on each side of the door. I keep the switches within the one segment square from where the door is placed. I right click on the switch properties and set the main script to "switch_dualuse.fpi". Also ensure the If Used field for the switch contains the exact name you used for the door.
The script I use for the switch:
switch_dualuse.fpi
;Artificial Intelligence Script
;Header
desc = Switch Activate (dual switch)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:state=1,plrsound=$0,activateifused=1,alttexture=1
:state=1,plrusingaction=0:state=2
:state=2,plrdistwithin=50,plrusingaction=0:state=3,plrsound=$1,activateifused=0,alttexture=0
:state=3,plrusingaction=0:state=10
;End of Script
Repeat the step for the switch with the second switch. Same script is used as the first switch.
The result- player walks up to the door, which remains closed. They activate the switch, door opens, and the player passes through. At a set distance away, the door closes. To return, the player activates the switch on the side they are on.
Video Demonstration:
There's no problem that can't be solved without applying a little scripting.