<scene name="MuseumSteps" numVictoryConditions="1" numSteps="5">
	<inventory>
		<object name="SignAndHook" memberName="HUD_sign + hook" acquired="0" visible="0"/>
		<object name="Sign" memberName="HUD_sign" acquired="0" visible="0">
			<onUseObject name="Hook">
				<action target="Scene" name="RemoveFromInventory" param="Sign"/>
				<action target="Scene" name="RemoveFromInventory" param="Hook"/>
				<action target="Scene" name="AddToInventory" param="SignAndHook"/>				
				<action target="Scene" name="StepComplete" param=""/>
			</onUseObject>
		</object>
		<object name="Hook" memberName="HUD_hook" acquired="0" visible="0">
			<onUseObject name="Sign">
				<action target="Scene" name="RemoveFromInventory" param="Sign"/>
				<action target="Scene" name="RemoveFromInventory" param="Hook"/>
				<action target="Scene" name="AddToInventory" param="SignAndHook"/>				
				<action target="Scene" name="StepComplete" param=""/>
			</onUseObject>
		</object>
		<object name="Stone" memberName="HUD_stone" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
	</finalStates>
	
	<animations>
		<animation name="TreeFallAnim" type="once" crossfade="1">
			<frames>
				<!--<frame memberName="tree fall 01_anim" frameDelay="500"/>-->
				<frame memberName="tree fall 07_anim" frameDelay="500"/>
				<frame memberName="tree fall 13_anim" frameDelay="500"/>
				<frame memberName="tree fall 19_anim" frameDelay="500"/>
				<frame memberName="tree fall 25_anim" frameDelay="500"/>
				<frame memberName="tree fall 30_anim" frameDelay="500"/>
			</frames>
		</animation>
		
		<animation name="DavidAnim" type="once" crossfade="1">
			<frames>
				<frame memberName="d1_anim" frameDelay="500"/>
				<frame memberName="d2_anim" frameDelay="500"/>
				<frame memberName="d3_anim" frameDelay="500"/>
			</frames>
		</animation>
	<!--
		<animation name="BackTree1Anim" type="loop">
			<frames>
				<frame memberName="tree back01_01_anim" frameDelay="60"/>
				<frame memberName="tree back01_02_anim" frameDelay="60"/>
				<frame memberName="tree back01_03_anim" frameDelay="60"/>
				<frame memberName="tree back01_04_anim" frameDelay="60"/>
				<frame memberName="tree back01_05_anim" frameDelay="60"/>
				<frame memberName="tree back01_06_anim" frameDelay="60"/>
				<frame memberName="tree back01_07_anim" frameDelay="60"/>
				<frame memberName="tree back01_08_anim" frameDelay="60"/>
				<frame memberName="tree back01_09_anim" frameDelay="60"/>
				<frame memberName="tree back01_10_anim" frameDelay="60"/>
				<frame memberName="tree back01_11_anim" frameDelay="60"/>
				<frame memberName="tree back01_10_anim" frameDelay="60"/>
				<frame memberName="tree back01_09_anim" frameDelay="60"/>
				<frame memberName="tree back01_08_anim" frameDelay="60"/>
				<frame memberName="tree back01_07_anim" frameDelay="60"/>
				<frame memberName="tree back01_06_anim" frameDelay="60"/>
				<frame memberName="tree back01_05_anim" frameDelay="60"/>
				<frame memberName="tree back01_04_anim" frameDelay="60"/>
				<frame memberName="tree back01_03_anim" frameDelay="60"/>
				<frame memberName="tree back01_02_anim" frameDelay="60"/>
				<frame memberName="tree back01_01_anim" frameDelay="60"/>
				
			</frames>
		</animation>
		
		<animation name="BackTree2Anim" type="loop" zpos="8">
			<frames>
				<frame memberName="tree back02_01_anim" frameDelay="60"/>
				<frame memberName="tree back02_02_anim" frameDelay="60"/>
				<frame memberName="tree back02_03_anim" frameDelay="60"/>
				<frame memberName="tree back02_04_anim" frameDelay="60"/>
				<frame memberName="tree back02_05_anim" frameDelay="60"/>
				<frame memberName="tree back02_06_anim" frameDelay="60"/>
				<frame memberName="tree back02_07_anim" frameDelay="60"/>
				<frame memberName="tree back02_08_anim" frameDelay="60"/>
				<frame memberName="tree back02_09_anim" frameDelay="60"/>
				<frame memberName="tree back02_10_anim" frameDelay="60"/>
				<frame memberName="tree back02_11_anim" frameDelay="60"/>
				<frame memberName="tree back02_10_anim" frameDelay="60"/>
				<frame memberName="tree back02_09_anim" frameDelay="60"/>
				<frame memberName="tree back02_08_anim" frameDelay="60"/>
				<frame memberName="tree back02_07_anim" frameDelay="60"/>
				<frame memberName="tree back02_06_anim" frameDelay="60"/>
				<frame memberName="tree back02_05_anim" frameDelay="60"/>
				<frame memberName="tree back02_04_anim" frameDelay="60"/>
				<frame memberName="tree back02_03_anim" frameDelay="60"/>
				<frame memberName="tree back02_02_anim" frameDelay="60"/>
				<frame memberName="tree back02_01_anim" frameDelay="60"/>
			</frames>
		</animation>
		
		<animation name="TreeAnim" type="loop">
			<frames>
				<frame memberName="tree01_anim" frameDelay="120"/>
				<frame memberName="tree02_anim" frameDelay="120"/>
				<frame memberName="tree03_anim" frameDelay="120"/>
				<frame memberName="tree04_anim" frameDelay="120"/>
				<frame memberName="tree05_anim" frameDelay="120"/>
				<frame memberName="tree06_anim" frameDelay="120"/>
				<frame memberName="tree07_anim" frameDelay="120"/>
				<frame memberName="tree08_anim" frameDelay="120"/>
				<frame memberName="tree09_anim" frameDelay="120"/>
				<frame memberName="tree10_anim" frameDelay="120"/>
				<frame memberName="tree11_anim" frameDelay="120"/>
				<frame memberName="tree10_anim" frameDelay="120"/>
				<frame memberName="tree09_anim" frameDelay="120"/>
				<frame memberName="tree08_anim" frameDelay="120"/>
				<frame memberName="tree07_anim" frameDelay="120"/>
				<frame memberName="tree06_anim" frameDelay="120"/>
				<frame memberName="tree05_anim" frameDelay="120"/>
				<frame memberName="tree04_anim" frameDelay="120"/>
				<frame memberName="tree03_anim" frameDelay="120"/>
				<frame memberName="tree02_anim" frameDelay="120"/>
				<frame memberName="tree01_anim" frameDelay="120"/>
			</frames>
		</animation>
	-->
	</animations>
	
	<zoomWindows>
		<zoomWindow name="SignWindow" file="ZoomWindows\MuseumSteps_Z1.dir" visible="0" hotspot="point(400, 600)"/>
		<zoomWindow name="HoodWindow" file="ZoomWindows\MuseumSteps_Z2.dir" visible="0" hotspot="point(245, 440)"/>
	</zoomWindows>
	
	<objects>
		<object name="SignWindow">
			<clickStrategy type="alpha" layer="sign"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="SignWindow"/>
						<action target="SignWindow" name="SetState" param="clickable"/>
					</onEvent>
				</state>
				
				<state name="clickable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>

					<onClick>
						<action target="Scene" name="OpenWindow" param="SignWindow"/>
					</onClick>
				</state>
			</states>
		</object>
		
		<object name="HoodWindow">
			<clickStrategy type="alpha" layer="hood"/>
			<states>
				<state name="notAvailable">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="hood open"/>
						<action target="Scene" name="PlaySound" param="S-30"/>
					</onStateEnter>
					
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="HoodWindow"/>
						<action target="HoodWindow" name="SetState" param="closed"/>
					</onEvent>
				</state>
				
				<state name="closed">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="HoodWindow" name="SetState" param="open"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onClick>
				</state>
				
				<state name="open">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="hood"/>
						<action target="Scene" name="ShowLayer" param="hood open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="HoodWindow"/>
					</onClick>
				</state>
			</states>
		</object>
		
		<object name="Sign">
			<states>
				<state name="attached">
					<onEvent name="sign_acquired">
						<action target="Sign" name="SetState" param="acquired"/>
						<action target="Scene" name="PlaySound" param="p-125"/>
					</onEvent>
				</state>
				
				<state name="acquired">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="sign"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Tree">
			<clickStrategy type="rect" left="500" top="0" right="635" bottom="380"/>
			<states>
				<state name="upright">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="tree pulled down"/>
						<action target="Scene" name="HideLayer" param="tree connected wire"/>
						<action target="Scene" name="HideLayer" param="hook attached"/>
						<!--<action target="Scene" name="StartAnimation" param="BackTree1Anim"/>
						<action target="Scene" name="StartAnimation" param="BackTree2Anim"/>
						<action target="Scene" name="StartAnimation" param="TreeAnim"/>-->
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="tree_click"/>
						<action target="SignWindow" name="SendEvent" param="reveal"/>
						<action target="HoodWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="SignAndHook">
						<action target="Scene" name="RemoveFromInventory" param="SignAndHook"/>
						<action target="Tree" name="SetState" param="ropeAttached"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="ropeAttached">
					<onStateEnter>
						<!--<action target="Scene" name="StopAnimation" param="TreeAnim"/>-->
						<action target="Scene" name="HideLayer" param="tree"/>
						<action target="Scene" name="ShowLayer" param="tree connected wire"/>
					</onStateEnter>
					
					<onEvent name="green_button_pressed">
						<!--<action target="Scene" name="CloseWindow" param="HoodWindow"/>-->
						<action target="Scene" name="DisableZoominHotspot" param="MuseumSteps_Z2"/>
						<action target="Scene" name="PlaySound" param="p-128"/>
						<action target="Tree" name="SetState" param="down" delay="2000"/>
						<action target="Scene" name="PlaySound" param="p-129" delay="2000"/>
						<action target="ExitArea" name="SendEvent" param="tree_down"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onEvent>
				</state>
				
				<state name="down">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="tree connected wire"/>
						<!--<action target="Scene" name="ShowLayer" param="tree pulled down"/>-->
						<action target="Scene" name="StartAnimation" param="TreeFallAnim"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="DoorArea">
			<clickStrategy type="rect" left="870" top="90" right="1024" bottom="235"/>
			<states>
				<state name="notAvailable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="door_click"/>
					</onClick>
				</state>
			</states>
		</object>
		
		<object name="ExitArea">
			<clickStrategy type="rect" left="60" top="70" right="290" bottom="290"/>
			<states>
				<state name="notAvailable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="noExit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="exit_click"/>
					</onClick>
					
					<onEvent name="tree_down">
						<action target="ExitArea" name="SetState" param="available"/>
					</onEvent>
				</state>
				
				<state name="available">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="ExitArea" name="SetState" param="done"/>
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1500"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
	</objects>
</scene>


