<scene name="MuseumSidedoor" numVictoryConditions="1" numSteps="3">
	<inventory>
		<object name="Paper" memberName="HUD_paper" acquired="0" visible="0"/>
		<object name="PocketKnife" memberName="HUD_pocket knife" acquired="0" visible="0"/>
		<object name="Rock" memberName="HUD_rock" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
	</finalStates>
	
	<animations>
	</animations>
	
	<zoomWindows>
		<zoomWindow name="GrassWindow" file="ZoomWindows\MuseumSidedoor_Z1.dir" visible="0" hotspot="point(395, 620)"/>
		<zoomWindow name="PanelWindow" file="ZoomWindows\MuseumSidedoor_Z2.dir" visible="0" hotspot="point(745, 508)"/>
	</zoomWindows>
	
	<objects>
		<object name="GrassWindow">
			<clickStrategy type="rect" left="310" top="540" right="480" bottom="700"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="GrassWindow"/>
						<action target="GrassWindow" 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="GrassWindow"/>
					</onClick>
				</state>
			</states>
		</object>
		
		<object name="PanelWindow">
			<clickStrategy type="alpha" layer="keypad open"/>
			<states>
				<state name="notAvailable">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="keypad open"/>
						<action target="Scene" name="HideLayer" param="keypad smashed"/>
						<action target="Scene" name="PlaySound" param="S-30"/>
					</onStateEnter>
					
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="PanelWindow"/>
						<action target="PanelWindow" name="SetState" param="closed"/>
					</onEvent>
				</state>
				
				<state name="closed">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="PanelWindow"/>
					</onClick>
					
					<onEvent name="knife_used">
						<action target="PanelWindow" name="SetState" param="open"/>
						<action target="Scene" name="PlaySound" param="p-131"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onEvent>
				</state>
				
				<state name="open">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="keypad open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="PanelWindow"/>
					</onClick>
					
					<onEvent name="rock_used">
						<action target="PanelWindow" name="SetState" param="smashed"/>
						<action target="Scene" name="PlaySound" param="p-132"/>
						<action target="Scene" name="PlaySound" param="02_david_opensesame_v1"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onEvent>
				</state>
				
				<state name="smashed">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="keypad open"/>
						<action target="Scene" name="ShowLayer" param="keypad smashed"/>
						<action target="Door" name="SendEvent" param="panel_smashed"/>
						<action target="Scene" name="CloseWindow" param="PanelWindow"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Door">
			<clickStrategy type="rect" left="605" top="418" right="720" bottom="665"/>
			<states>
				<state name="locked">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="door open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="noExit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="door_clicK"/>
						<action target="GrassWindow" name="SendEvent" param="reveal"/>
						<action target="PanelWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onEvent name="panel_smashed">
						<action target="Door" name="SetState" param="unlocked"/>
					</onEvent>
				</state>
				
				<state name="unlocked">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Door" name="SetState" param="open"/>
						<action target="GrassWindow" name="SendEvent" param="reveal"/>
						<action target="PanelWindow" name="SendEvent" param="reveal"/>
						<action target="Scene" name="PlaySound" param="p-133"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onClick>
				</state>
				
				<state name="open">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="door open"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1000"/>
					</onStateEnter>
				</state>
			</states>
		</object>
	</objects>
</scene>

