I did this for a game and i want to share this with the community!
Maybe someone find this useful!
How it works:
1. Open the door(do not let look the player at the door while the game starts, so its a gost which opens a door)
2. Door is open, so player can close it with enter and then open it
here the script:
;Artificial Intelligence Script
;Created by Corno_1
;Header
desc = Open door(can close and open)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=usedoorprompt,hudhide=1,hudmake=display,state=11
:state=11:activate=2,state=12
:state=12,activated=2:state=13,setframe=0
:state=13:incframe=0
:state=13,frameatend=0:state=2,coloff
:state=10,plrdistwithin=60:hudshow=usedoorprompt,hudfadeout=usedoorprompt
:state=10,plrdistwithin=60,plrusingaction=1:activate=2
:state=10,activated=2:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistwithin=60,plrusingaction=1:activate=0
:state=2,activated=0:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0
;End of Script
Public void likeFpsc{ System.out.println("I like FPSC!" ) ;}
http://forum.thegamecreators.com/?m=forum_view&t=196656&b=24