Maybe someone needs something like that.
With these scripts you have to use 3 switches in a correct order to open a door:
Switch 01:
;Artificial Intelligence Script
;Header
desc = Use Switch ( 3 Switches ) No.01
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=100:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:state=1,activateifused=1,activate=0,setframe=0,plrsound=audiobank\ww2\scenery\doorsopen.wav
:state=1:incframe=0
:state=1,frameatend=0:state=2
:state=2,plrusingaction=0:state=3
:state=3,activated=1:state=4,plrsound=audiobank\ww2\scenery\doorsclose.wav,activateifused=0
:state=4:decframe=0
:state=4,frameatstart=0:state=5,setframe=0
:state=5,plrusingaction=0:state=10
;End of Script
Swich 02:
;Artificial Intelligence Script
;Header
desc = Use Switch ( 3 Switches ) No.02
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=100:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:state=1,activateifused=2,activate=0,setframe=0,plrsound=audiobank\ww2\scenery\doors\open.wav
:state=1:incframe=0
:state=1,frameatend=0:state=2
:state=2,plrusingaction=0:state=3
:state=3,activated=1:state=4,plrsound=audiobank\ww2\scenery\doors\close.wav,activateifused=0
:state=4:decframe=0
:state=4,frameatstart=0:state=5,setframe=0
:state=5,plrusingaction=0:state=10
;End of Script
Switch 03:
;Artificial Intelligence Script
;Header
desc = Use Switch ( 3 Switches ) No.03
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=100:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:state=1,activateifused=3,activate=0,setframe=0,plrsound=audiobank\ww2\scenery\doors\open.wav
:state=1:incframe=0
:state=1,frameatend=0:state=2
:state=2,plrusingaction=0:state=3
:state=3,activated=1:state=4,plrsound=audiobank\ww2\scenery\doorsclose.wav,activateifused=0
:state=4:decframe=0
:state=4,frameatstart=0:state=5,setframe=0
:state=5,plrusingaction=0:state=10
;End of Script
The scripts are only for
animated swiches!
I tried it with switches that only change their texture too but the function "alttexture" seems not to work in the EA Version and it would be very confusing for the player if he cannot see what switch he has used already.
The script for the door:
;Artificial Intelligence Script
;Header
desc = Remote Controlled Door ( 3 Switches )
;Triggers
:state=0,activated=1:state=10,activate=0
:state=0,activated=2:state=1,activate=0
:state=0,activated=3:state=1,activate=0
:state=1,activated=1:state=2,activate=0
:state=1,activated=2:state=2,activate=0
:state=1,activated=3:state=2,activate=0
:state=2,activated=1:state=3,activate=0
:state=2,activated=2:state=3,activate=0
:state=2,activated=3:state=3,activate=0
:state=3:activateifused=1,state=0,activate=0
:state=10,activated=2:state=20
:state=10,activated=1:state=2,activate=0
:state=10,activated=3:state=2,activate=0
:state=20,activated=3:state=30,setframe=0,sound=$0
:state=30:incframe=0
:state=30,frameatend=0:state=40,coloff
;End of Script
Important:
1) Give all 3 switches the
same name!
2) Type this name in the "If Used" field of the door.
3) Type the name of the door in the "If Used" field of all 3 switches.
I am sure there are other ways to script something like that, but these versions seem to work fine.
I tried them in the "Test" mode, not in a built game.