Hi all this is my first time posting here
I'm trying to make a key coded door that uses a pin to unlock e.g. 1234 opens the door anything else won't the script I'm using is from the user Storytellers
;Artificial Intelligence Script:CodeInput02
by TheStoryteller01 2012
;Header
desc=
This script only works with FPSC 1.18. or later.
Made for control pads, monitors or smiliar where the player has to enter a 4-digit code to open a remote door.
Best ist to set the item properties "Isimmobile" to "Yes" and "Strength" to "0" (=indestructible).
The name of the remote door has to be entered in the "Ifused" field of this entity.
The script starts when the player moves the cursor over the item while not more than 60 units away.
If the player enters the wrong code an alarm sound is started but he can still try to enter the correct code and
entering the correct code turns off the alarm. Once the door is opened, it cannot be closed again.
The correct code for this script is 6184. To change it, refer to the keypboard's numpad numbers below:
1=79
2=80
3=81
4=75
5=76
6=77
7=71
8=72
9=73
;Triggers
:state=0:state=1
:state=1,pickobject=1,plrdistwithin=60:state=3
:state=3:fpgcrawtextsize=48,fpgcrawtextfont=verdana,fpgcrawtextr=190,fpgcrawtextg=190,fpgcrawtextb=190,fpgcrawtextx=50,fpgcrawtexty=46
:state=3:fpgcrawtext=?
:state=3,plrusingaction=1,etimergreater=500:state=4
:state=3,pickobject=0:state=1
:state=4,pickobject=1,plrdistwithin=60:etimerstart,state=5
:state=5:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=190,fpgcrawtextg=190,fpgcrawtextb=190,fpgcrawtextx=50,fpgcrawtexty=56
:state=5:fpgcrawtext=Entering the right access code should open this door.
:state=5,plrusingaction=1,etimergreater=500:state=6
:state=5,pickobject=0:state=4
:state=6,pickobject=1,plrdistwithin=60:etimerstart,state=7
:state=7:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=051,fpgcrawtextx=50,fpgcrawtexty=56
:state=7:fpgcrawtext=Enter the 4-digit code <use the keyboard's numpad>
:state=7,etimergreater=3000:state=40
:state=7,plrusingaction=1,etimergreater=500:state=40
:state=7,pickobject=0:state=6
:state=40,pickobject=1,plrdistwithin=100:state=50
:state=50:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=051,fpgcrawtextx=50,fpgcrawtexty=56
:state=50:fpgcrawtext=_ _ _ _
:state=50,keypressed=77 1:plrsound=audiobank\switches\press.wav,state=52
:state=50,keypressed=80 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,keypressed=81 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,keypressed=75 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,keypressed=76 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,keypressed=79 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,keypressed=71 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,keypressed=72 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,keypressed=73 1:plrsound=audiobank\switches\press.wav,state=99
:state=50,pickobject=0:state=6
:state=52:etimerstart,state=53
:state=53:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=051,fpgcrawtextx=50,fpgcrawtexty=56
:state=53:fpgcrawtext=* _ _ _
:state=53,pickobject=1,plrdistwithin=100,etimergreater=500:state=55
:state=53,pickobject=0:state=6
:state=55:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=051,fpgcrawtextx=50,fpgcrawtexty=56
:state=55:fpgcrawtext=* _ _ _
:state=55,keypressed=79 1:plrsound=audiobank\switches\press.wav,state=56
:state=55,keypressed=80 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,keypressed=81 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,keypressed=75 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,keypressed=76 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,keypressed=77 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,keypressed=71 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,keypressed=72 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,keypressed=73 1:plrsound=audiobank\switches\press.wav,state=99
:state=55,pickobject=0:state=6
:state=56:etimerstart,state=57
:state=57:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=51,fpgcrawtextx=50,fpgcrawtexty=56
:state=57:fpgcrawtext=* * _ _
:state=57,pickobject=1,plrdistwithin=100,etimergreater=500:state=59
:state=57,pickobject=0:state=6
:state=59:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=051,fpgcrawtextx=50,fpgcrawtexty=56
:state=59:fpgcrawtext=* * _ _
:state=59,keypressed=72 1:plrsound=audiobank\switches\press.wav,state=60
:state=59,keypressed=80 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,keypressed=81 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,keypressed=75 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,keypressed=76 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,keypressed=77 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,keypressed=71 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,keypressed=79 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,keypressed=73 1:plrsound=audiobank\switches\press.wav,state=99
:state=59,pickobject=0:state=6
:state=60:etimerstart,state=61
:state=61:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=51,fpgcrawtextx=50,fpgcrawtexty=56
:state=61:fpgcrawtext=* * * _
:state=61,pickobject=1,plrdistwithin=100,etimergreater=500:state=63
:state=61,pickobject=0:state=6
:state=63:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=051,fpgcrawtextx=50,fpgcrawtexty=56
:state=63:fpgcrawtext=* * * _
:state=63,keypressed=75 1:plrsound=audiobank\switches\press.wav,state=64
:state=63,keypressed=80 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,keypressed=81 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,keypressed=79 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,keypressed=76 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,keypressed=77 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,keypressed=71 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,keypressed=72 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,keypressed=73 1:plrsound=audiobank\switches\press.wav,state=99
:state=63,pickobject=0:state=6
:state=64,etimerstart:state=65
:state=65:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=51,fpgcrawtextx=50,fpgcrawtexty=56
:state=65:fpgcrawtext=* * * *
:state=65,pickobject=1,plrdistwithin=100,etimergreater=2000:state=90
:state=90:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=51,fpgcrawtextx=50,fpgcrawtexty=56
:state=90:fpgcrawtext=CODE VALID
:state=90:plrsound=audiobank\misc\checkpoint.wav,state=91
:state=91:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=255,fpgcrawtextb=51,fpgcrawtextx=50,fpgcrawtexty=56
:state=91:fpgcrawtext=CODE VALID
:state=91:music=OFF
:state=91:etimergreater=3000:state=92
:state=91,pickobject=0:state=92
:state=92:fpgcrawtextoff,activateifused=1
:state=99:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=204,fpgcrawtextg=000,fpgcrawtextb=000,fpgcrawtextx=50,fpgcrawtexty=56
:state=99:fpgcrawtext=CODE INVALID
:state=99:etimerstart,music=audiobank\atmos\alarmhum.wav,state=100
:state=100,plrusingaction=1,etimergreater=500:state=50
:state=100,pickobject=0:state=6
;end of script
but it wont work for me I'm using FPS Creator original patched to version 1.19 and putting the code in the (main) entry for a keypad but when I go to use it nothing appears please can some one tell me what I'm doing wrong as I have been trying to get this working for over 5 hours and still got nothing. I have set the (if used) section of the keypad to my door's name as well.
Thanks all
C-P