Okay, as my title says a have a semi advanced lock picking script, and it is not working. What is supposed to happen is the player is supposed to tape (Z) then (x) then do it again, and all of this has to be done fast or the door wont open. here is my script right now, and the problem is that the door just opens.
;Artificial Intelligence Script
;Header
desc =
;Triggers
:State=0,plrdistwithin=120:state=1
:state=1,scancodekeypressed=z:etimerstart,state=2
:state=2,etimergreater=250:state=0
:state=2,scancodekeypressed=x:state=3
:state=3,etimergreater=250:state=0
:state=3,scancodekeypressed=z:etimerstart,state=4
:state=4,etimergreater=250:state=0
:state=4,scancodekeypressed=x:etimerstart,state=5
:state=5,etimergreater=250:state=0
:state=5,scancodekeypressed=z:etimerstart,state=6
:state=6,etimergreater=250:state=0
:state=6,scancodekeypressed=z:etimerstart,state=7
:state=7,plrdistwithin=120:state=11
:state=8:incframe=0
:state=8,frameatend=0:state=9,coloff
:state=9,plrdistfurther=120:state=10,sound=$1,colon
:state=10:decframe=0
:state=10,frameatstart=0:state=7,setframe=0
:state=11,plrcanbeseen:state=8,setframe=0,sound=$0
:state=11:state=0
;End of Script
The problem is that the door just opens at the start of the level without me even pressing anything.
Thank you in advance to any and all help.