;;; Sierra Script 1.0 - (do not remove this comment)
(script# 303)
(include sci.sh)
(use Main)
(use Sound)
(use Cycle)
(use Feature)
(use Obj)

(public
	playIt 0
)

(local
	newProp
	gEgoViewer
)
(instance musicLute of Sound
	(properties
		number 54
	)
)

(instance playIt of Script
	(properties)
	
	(method (init)
		(Load rsVIEW 54)
		(= global204 1)
		(super init:)
	)
	
	(method (changeState newState)
		(switch (= state newState)
			(0
				(proc0_8)
				(= newProp (Prop new:))
				(if
				(and (!= (gEgo view?) 2) (!= (gEgo view?) 4))
					(proc0_9)
					(musicLute dispose:)
					(DisposeScript 303)
					(return)
				)
				(if (== (gEgo view?) 2)
					(newProp
						view: 888
						ignoreActors:
						setPri: (gEgo priority?)
						cycleSpeed: 1
						setCycle: Fwd
						posn: (+ (gEgo x?) 13) (- (gEgo y?) 27)
						init:
					)
				else
					(newProp
						view: 888
						ignoreActors:
						setPri: (gEgo priority?)
						cycleSpeed: 1
						setCycle: Fwd
						posn: (+ (gEgo x?) 15) (- (gEgo y?) 37)
						init:
					)
				)
				(gSounds eachElementDo: #stop 0)
				(musicLute play: self)
				(= gEgoViewer (gEgo viewer?))
				(gEgo
					viewer: 0
					view: 54
					setMotion: 0
					loop: (if (== (gEgo view?) 2) 0 else 1)
					cycleSpeed: 2
					setCycle: Fwd
				)
			)
			(1
				(gEgo
					viewer: gEgoViewer
					view: (if (== (gEgo loop?) 0) 2 else 4)
				)
				(newProp dispose:)
				(gEgo
					viewer: gEgoViewer
					script: gGEgoScript
					cycleSpeed: 0
					loop: 2
					setCycle: Walk
				)
				(proc0_9)
				(musicLute dispose:)
				(DisposeScript 303)
			)
		)
	)
)
