<scene name="MallCorridor" numVictoryConditions="1" numSteps="5">
	<inventory>
		<object name="BushClippers" memberName="HUD_bush clippers" acquired="0" visible="0">
			<onUseObject name="Tree">
				<action target="Scene" name="RemoveFromInventory" param="Tree"/>
				<action target="Scene" name="RemoveFromInventory" param="BushClippers"/>
				<action target="Scene" name="AddToInventory" param="Branch"/>
				<action target="Scene" name="StepComplete" param=""/>
			</onUseObject>
		</object>
		<object name="Saw" memberName="HUD_saw" acquired="0" visible="0"/>
		<object name="Paper" memberName="HUD_paper" acquired="0" visible="0"/>
		<object name="Matches" memberName="HUD_matches" acquired="0" visible="0"/>
		<object name="Tree" memberName="HUD_tree" acquired="0" visible="0">
			<onUseObject name="BushClippers">
				<action target="Scene" name="RemoveFromInventory" param="Tree"/>
				<action target="Scene" name="RemoveFromInventory" param="BushClippers"/>
				<action target="Scene" name="AddToInventory" param="Branch"/>
				<action target="Scene" name="StepComplete" param=""/>
			</onUseObject>
		</object>
		<object name="Branch" memberName="HUD_branch trimed" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="ToolWindow" state="done"/>
		<finalState objName="GarbageWindow" state="done"/>
		<finalState objName="GarbageCan" state="onFire"/>
		<finalState objName="FireAlarm" state="on"/>
		<finalState objName="Tree" state="trimmed"/>
		<finalState objName="Door" state="done"/>
	</finalStates>
	
	<slidersMap>
		<slider layerName="slider_L25_Debris" id="mom"/>
	</slidersMap>
	
	<animations>
		<animation name="FireAnim" type="loop" xpos="66" ypos="440" member="Small Flame Loop"/>

		<animation name="DavidAnim" type="once" zpos="200" crossfade="1">
			<frames>
				<frame memberName="d1_anim" frameDelay="500"/>
				<frame memberName="d2_anim" frameDelay="500"/>
				<frame memberName="d3_anim" frameDelay="500"/>
			</frames>
		</animation>
	</animations>
	
	<zoomWindows>
		<zoomWindow name="ToolWindow" file="ZoomWindows\MallCorridor_Z1.dir" visible="0" hotspot="point(640, 397)"/>
		<zoomWindow name="GarbageWindow" file="ZoomWindows\MallCorridor_Z2.dir" visible="0" hotspot="point(587, 572)"/>
	</zoomWindows>
	
	<challengeWindows>
		<challengeWindow name="ChallengeWindow" challenge="level_20_challenge" reward="level_20_reward" file="ZoomWindows\MallCorridor_ZC.dir">
			<clickStrategy type="alpha" layer="gate open"/>
		</challengeWindow>
	</challengeWindows>
	
	<objects>
		<object name="Ambience">
			<states>
				<state name="Ambience">
					<onStateEnter>
						<action target="Scene" name="PlaySound" param="S-31"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="ToolWindow">
			<clickStrategy type="rect" left="580" top="360" right="700" bottom="435"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="ToolWindow"/>
						<action target="ToolWindow" 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="ToolWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="GarbageWindow">
			<clickStrategy type="rect" left="540" top="540" right="635" bottom="605"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="GarbageWindow"/>
						<action target="GarbageWindow" 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="GarbageWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="GarbageCan">
			<clickStrategy type="rect" left="50" top="425" right="83" bottom="490"/>
			<states>
				<state name="idle">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="paper"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="garbagecan_click"/>
					</onClick>
					
					<onUseObject name="Paper">
						<action target="Scene" name="RemoveFromInventory" param="Paper"/>
						<action target="GarbageCan" name="SetState" param="withPaper"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="withPaper">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="paper"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="paper_click"/>
					</onClick>
					
					<onUseObject name="Matches">
						<action target="Scene" name="RemoveFromInventory" param="Matches"/>
						<action target="GarbageCan" name="SetState" param="onFire"/>
						<action target="FireAlarm" name="SendEvent" param="fire_set"/>
						<action target="Door" name="SendEvent" param="fire_set"/>
						<action target="Scene" name="PlaySound" param="p-089"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="onFire">
					<onStateEnter>
						<action target="Scene" name="StartAnimation" param="FireAnim"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="FireAlarm">
			<states>
				<state name="off">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="fire alarm on"/>
					</onStateEnter>
					
					<onEvent name="fire_set">
						<action target="FireAlarm" name="SetState" param="on" delay="2000"/>
						<action target="Scene" name="PlaySound" param="p-092" delay="2000"/>
					</onEvent>
				</state>
				
				<state name="on">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="fire alarm on"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Tree">
			<clickStrategy type="rect" left="201" top="195" right="350" bottom="440"/>
			<states>
				<state name="whole">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="tree trimed"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="tree_click"/>
						<action target="ToolWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Saw">
						<action target="Scene" name="RemoveFromInventory" param="Saw"/>
						<action target="Scene" name="AddToInventory" param="Tree"/>
						<action target="Tree" name="SetState" param="trimmed"/>
						<action target="Scene" name="PlaySound" param="p-090"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="trimmed">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="tree trimed"/>
						<action target="Scene" name="HideLayer" param="tree"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Door">
			<clickStrategy type="rect" left="88" top="326" right="222" bottom="442"/>
			<states>
				<state name="locked">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="gate open"/>
						<action target="Scene" name="HideLayer" param="gate open reflections"/>
						<action target="Scene" name="HideLayer" param="branch reflection"/>
						<action target="Scene" name="HideLayer" param="branch"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="noExit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="door_locked_click"/>
						<action target="GarbageWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onEvent name="fire_set">
						<action target="Door" name="SetState" param="unlocked"/>
					</onEvent>
				</state>
				
				<state name="unlocked">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowLayer" param="gate open"/>
						<action target="Scene" name="ShowLayer" param="gate open reflections"/>
						<action target="Scene" name="HideLayer" param="gate open" delay="500"/>
						<action target="Scene" name="HideLayer" param="gate open reflections" delay="500"/>
						<action target="Scene" name="ShowDialog" param="gate_needs_branch" delay="1000"/>
						<action target="GarbageWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Tree">
						<action target="Scene" name="ShowDialog" param="door_tree"/>
					</onUseObject>
					
					<onUseObject name="Branch">
						<action target="Scene" name="RemoveFromInventory" param="Branch"/>
						<action target="Door" name="SetState" param="braced"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="braced">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="gate open"/>
						<action target="Scene" name="ShowLayer" param="gate open reflections"/>
						<action target="Scene" name="ShowLayer" param="branch reflection" delay="500"/>
						<action target="Scene" name="ShowLayer" param="branch" delay="500"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Door" name="SetState" param="ddone"/>
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1500"/>
					</onClick>
				</state>
				
				<state name="ddone">
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="gate open"/>
						<action target="Scene" name="ShowLayer" param="gate open reflections"/>
						<action target="Scene" name="ShowLayer" param="branch reflection"/>
						<action target="Scene" name="ShowLayer" param="branch"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ReplayExit" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>

