<scene name="AllyNavigate" numVictoryConditions="1" numSteps="4">
	<inventory>
		<object name="Fireworks" memberName="HUD_fireworks" acquired="0" visible="0"/>
		<object name="Clippers" memberName="HUD_clippers" acquired="0" visible="0"/>
		<object name="Matches" memberName="HUD_matches" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="DumpsterWindow" state="done"/>
		<finalState objName="Fence" state="done"/>
		<finalState objName="GarbageWindow" state="done"/>
		<finalState objName="Door" state="done"/>
	</finalStates>
	
	<slidersMap>
		<slider layerName="slider_R60_Debris" id="bridge10"/>
	</slidersMap>
	
	<animations>
		<!--<animation name="DoorAnim" type="once" xpos="655" ypos="375" member="Fireworks Composite"/>-->
		<animation name="DoorAnim" type="once" xpos="655" ypos="375">
			<frames>
				<frame memberName="Fireworks Composite_000_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_002_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_004_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_006_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_008_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_010_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_012_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_014_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_016_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_018_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_020_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_022_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_024_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_026_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_028_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_030_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_032_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_034_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_036_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_038_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_040_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_042_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_044_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_046_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_048_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_050_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_052_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_054_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_056_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_058_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_060_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_062_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_064_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_066_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_068_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_070_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_072_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_074_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_076_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_078_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_080_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_082_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_084_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_086_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_088_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_090_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_092_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_094_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_096_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_098_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_100_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_102_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_104_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_106_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_108_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_110_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_112_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_114_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_116_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_118_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_120_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_122_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_124_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_126_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_128_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_130_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_132_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_134_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_136_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_138_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_140_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_142_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_144_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_146_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_148_anim" frameDelay="40"/>
				<frame memberName="Fireworks Composite_150_anim" frameDelay="40"/>
			</frames>
		</animation>
		
		<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="DumpsterWindow" file="ZoomWindows\AllyNavigate_Z1.dir" visible="0" hotspot="point(462, 427)"/>
		<zoomWindow name="GarbageWindow" file="ZoomWindows\AllyNavigate_Z2.dir" visible="0" hotspot="point(605, 446)"/>
	</zoomWindows>
	
	<objects>
		<object name="Ambience">
			<states>
				<state name="Ambience">
					<onStateEnter>
						<action target="Scene" name="PlaySound" param="S-30"/>
					</onStateEnter>
				</state>
			</states>
		</object>

		<object name="DumpsterWindow">
			<clickStrategy type="alpha" layer="container closed"/>
			<states>
				<state name="notAvailable">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="container open"/>
					</onStateEnter>
					
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="DumpsterWindow"/>
						<action target="DumpsterWindow" name="SetState" param="closed"/>
					</onEvent>
				</state>
				
				<state name="closed">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="DumpsterWindow" name="SetState" param="open"/>
						<action target="Scene" name="PlaySound" param="p-068"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onClick>
				</state>

				<state name="open">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="container closed"/>
						<action target="Scene" name="ShowLayer" param="container open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
				
					<onClick>
						<action target="Scene" name="OpenWindow" param="DumpsterWindow"/>
					</onClick>
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="container closed"/>
						<action target="Scene" name="ShowLayer" param="container open"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Fence">
			<clickStrategy type="rect" left="565" top="335" right="625" bottom="470"/>
			<states>
				<state name="idle">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="gate open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="gate_locked"/>
						<action target="DumpsterWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Clippers">
						<action target="Scene" name="RemoveFromInventory" param="Clippers"/>
						<action target="Fence" name="SetState" param="open"/>
						<action target="Scene" name="PlaySound" param="p-069"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="open">
					<onStateEnter>
						<!--<action target="Scene" name="HideLayer" param="fence"/>-->
						<action target="Scene" name="HideLayer" param="gate open"/>
						<action target="GarbageWindow" name="SendEvent" param="fenceDestroyed"/>
						<action target="Door" name="SendEvent" param="fenceDestroyed"/>
					</onStateEnter>
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="gate open"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="GarbageWindow">
			<clickStrategy type="rect" left="565" top="412" right="645" bottom="480"/>
			<states>
				<state name="not_available">
					<onEvent name="fenceDestroyed">
						<action target="GarbageWindow" name="SetState" param="notAvailable"/>
					</onEvent>
				</state>
				
				<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="Door">
			<clickStrategy type="rect" left="557" top="324" right="586" bottom="410"/>
			<states>
				<state name="not_available">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="restaurant door open"/>
						<action target="Scene" name="HideLayer" param="door_fireworks"/>
					</onStateEnter>
					
					<onEvent name="fenceDestroyed">
						<action target="Door" name="SetState" param="idle"/>
					</onEvent>
				</state>
				
				<state name="idle">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="door_jammed"/>
						<action target="GarbageWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Fireworks">
						<action target="Scene" name="RemoveFromInventory" param="Fireworks"/>
						<action target="Door" name="SetState" param="withFireworks"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="withFireworks">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="door_fireworks"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="door_fireworks"/>
						<action target="GarbageWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Matches">
						<action target="Scene" name="RemoveFromInventory" param="Matches"/>
						<action target="Scene" name="ShowLayer" param="restaurant door open"/>
						<action target="Scene" name="StartAnimation" param="DoorAnim"/>
						<action target="Scene" name="PlaySound" param="p-070"/>
						<action target="Door" name="SetState" param="readyToLeave" delay="800"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="readyToLeave">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1500"/>
						<action target="Door" name="SetState" param="ddone"/>
					</onClick>
				</state>
				
				<state name="ddone">
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="restaurant door open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ReplayExit" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>

