;Artificial Intelligence Script

;Header

desc          = Use Door (Push Open and Push Closed)

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\hand.png,hudname=keydoorprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=keydoorprompt
:state=10,plrdistfurther=61:hudunshow=keydoorprompt

:state=10,plrdistwithin=60,plrhaskey=0,plrusingaction=1:sound=audiobank\user\AccessDenied.wav,hudunshow=keydoorprompt,state=11
:state=10,plrdistwithin=60,plrhaskey=1,plrusingaction=1:activate=2,hudunshow=keydoorprompt
:state=10,activated=2:state=1,setframe=0,sound=$0,activateifused=1
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,activated=1:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:setframe=0
:state=3,activated=3:destroy

:state=11:etimerstart,state=12
:state=12,etimergreater=1500:state=10
;End of Script

