Actually, I think I have answered it somewhat. Here is the code. It is the pin code script by xplosys, which I added to.
I used a variable to control the visibility of my custom hud. The keycode is the word "zap" and I also added huds for each letter so you can see them when you type.
I freeze the player and disable weapon/mouselook once the first letter is pressed, and then when the code is complete, the player unfreezes and the letters disappear after 1.5 seconds.
It's a noobish hack, but it works, maybe someone will find it useful
Thanks for your help, this is such a cool program.
Mark
;Artificial Intelligence Script
; by xplosys
;INSTRUCTIONS
; In the lines state=10 through state=13
; change the scancodekeypressed=X value
; to change the access code.
;
; The code is only required to open and
; not to close. For instance, if used to
; open a door, the access code will open
; the door and the enter key will close
; it again.
;Header
desc = Switch Activate (enter pass code)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\codekey.png,hudname=useswitchprompt,hudhide=1,hudmake=display,globalvar=1,setvar=1
:state=0:hudreset,hudx=45,hudy=80,hudimagefine=gamecore\text\z.png,hudname=z,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=80,hudimagefine=gamecore\text\a.png,hudname=a,hudhide=1,hudmake=display
:state=0:hudreset,hudx=55,hudy=80,hudimagefine=gamecore\text\p.png,hudname=p,hudhide=1,hudmake=display,state=10
:plrdistwithin=50,state=10:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:plrdistwithin=50,varequal=10:PLRFREEZE=1,PLRDISABLE=1
:plrdistwithin=50,varequal=14:PLRFREEZE=0,PLRDISABLE=0
:state=10,plrdistwithin=50,scancodekeypressed=44:state=11,hudshow=z,sound=audiobank\switches\press.wav,setvar=10
:state=11,plrdistwithin=50,scancodekeypressed=30:state=12,hudshow=a,sound=audiobank\switches\press.wav
:state=12,plrdistwithin=50,scancodekeypressed=25:state=14,hudshow=p,sound=audiobank\switches\press.wav
:state=14:state=1,plrsound=$0,activateifused=0,alttexture=0,setvar=14,timerstart
:varequal=14,timergreater=1500:hudunshow=z,hudunshow=a,hudunshow=p
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistfurther=120:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0
:state=4,plrcanbeseen:state=1,setframe=0,sound=$0
:state=4,state=0
;End of Script