;; ;; Master Eye Script ;; Slaves are LeftEye.ats ;; ;; Script Name Scriptname RightEye Start: Rate 1,0 ;; Set the Anim Rate to 30 fps Tex 0 ;; Set the texture to Frame 0 ;; ;; Main Blink Loop ;; BlinkLoop: Wait 0,180 ;; Wait randomly between 0 to 160 frames XRef FastCloseLeftEye ;; Close the left eye Gosub FastCloseRightEye ;; Close the right eye Wait 0,7 ;; Hold eye closed for random time XRef OpenLeftEye ;; Close the right eye Gosub OpenRightEye ;; Open the right eye Goto BlinkLoop ;; Restart the loop ;; ;; Sub Routines ;; OpenRightEye: Repeat ;; Open Eye using a loop TexAdj -1,0,3 UntilTex = 0 Ret CloseRightEye: Repeat ;; Close Eye using a loop TexAdj 1,0,3 UntilTex = 3 Ret FastCloseRightEye: Tex 0 ;; Fast Close using frame list Tex 2 ;; that skips certain frames Tex 3 Ret CloseAngelRightEye: Tex 4 ;; Angel Crash currently uses 1 frame Ret ;; of texture animation for a closed eye OpenAngelRightEye: Tex 0 ;; Reset eye to open Ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Event Handlers ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Event 1 on - Angel Crash ;; On 1 XRef ResetAngelLeftEye ;; Reset LeftEye Texture to open Tex 0 ;; Reset RightEye Texture to open AngelBlink: Wait 0,120 ;; Wait a random time XRef CloseAngelLeftEye ;; Start slave - Close Angel eye Gosub CloseAngelRightEye ;; Close Angel right eye Wait 1,7 ;; Hold eye closed XRef OpenAngelLeftEye ;; Start slave - Open Angel eye Gosub OpenAngelRightEye ;; Open right eye Goto AngelBlink ;; Restart loop while event is still set ;; ;; Event 1 off - Reset Eye to open ;; Off 1 Tex 0 ;; Reset blink to a safe frame Goto BlinkLoop ;; Return to normal blink ;; ;; Close eyes - Death etc ;; On 5 XRef FastCloseLeftEye ;; Close remote left eye Gosub FastCloseRightEye ;; Close the right eye End Off 5 XRef OpenLeftEye ;; Open Remote Left eye Gosub OpenRightEye ;; Open remote Right eye End