So while I was working with a lift, I wanted it to go up, stay there, and go back down when the player is X distance away. In trying to get this to work (which it hasn't) I have lost the original copy of lift1.fpi, and it would be great if someone simply uploaded it here of did a code snippet thing so I could copy and paste it.
Also, here is my current script for the lift that is supposed to go up, wait until player is X distance away, then do back down.
;Artificial Intelligence Script
;Header
desc = Auto Lift (Up, Wait, Down) (activate brings lift to plr)
;Triggers
:state=0,plrhigher=10,plrdistwithin=50:state=6,coloff
:state=1:moveup=1
:state=1,raycastup=20 200:state=2
:state=2,plrdistfurther=55,playerassociated:state=3,unassociateplayer,colon
:state=3,plrhigher=10,plrdistwithin=50:state=7,coloff
:state=4,plrdistfurther=100:moveup=-1,state=5
:state=5,plrdistfurther=55,playerassociated:state=0,unassociateplayer,colon
:state=6,plrdistwithin=50:sound=audiobank\scifi\scenery\lifts\up.wav,state=1,associateplayer
:state=6,plrdistfurther=55,playerassociated:state=0,colon
:state=7,plrdistwithin=50:sound=audiobank\scifi\scenery\lifts\down.wav,state=4,associateplayer
:state=7,plrdistfurther=55,playerassociated:state=3,colon
:activated=1:state=11,activate=0
:state=11,plrhigher=100:state=21
:state=11:state=31
:state=21,raycastup=20 100:state=3
:state=21:state=1
:state=31,raycastup=20 0:state=0
:state=31:state=4
;End of Script
Any help is always greatly appreciated, as I am somewhat new to scripting.