1. Open Notepad and copy and paste the code in:
;Artificial Intelligence Script
;Header
desc = Key Door (Open 'With Key' and Close)
;Triggers
:always:globalvar=50
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\lockeddoor.tga,hudname=keydoorprompt,hudhide=1,hudmake=display,setvar=0,state=10
:state=10,plrdistwithin=60,varequal=0:hudshow=keydoorprompt,hudfadeout=keydoorprompt
:state=10,plrdistwithin=60,varequal=1,plrusingaction=1:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistfurther=60:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0
;End of Script
2. Save the file to your scriptbank folder as "lockeddoor.fpi"
3. Start a new notepad and copy and paste this code in:
;Artificial Intelligence Script
;Header
desc = Leave corpse
;Triggers
:state=0:state=1,suspend,coloff,globalvar=50,setvar=1
;End of Script
4. Save the file to your scriptbank folder as "killopendoor.fpi"
5. Now when in FPSC, right click the character you are going to use and place the "killopendoor.fpi" script in the
destroy field. apply changes
6. Now right click the door you are going to use and place the "lockeddoor.fpi" script in it's
main field. apply changes