<scene name="BridgeOut" numVictoryConditions="1" numSteps="7">
	<inventory>
		<object name="Tube" memberName="HUD_tube" acquired="0" visible="0"/>
		<object name="Drill" memberName="HUD_drill" acquired="0" visible="0"/>
		<object name="Cement" memberName="HUD_cement" acquired="0" visible="0"/>
		<object name="Rope1" memberName="HUD_rope01" acquired="0" visible="0"/>
		<object name="Rope2" memberName="HUD_rope02" acquired="0" visible="0"/>
		<object name="Water" memberName="HUD_barrel" acquired="0" visible="0"/>
		<object name="Ram" memberName="HUD_ram" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="TruckWindow" state="done"/>
		<finalState objName="CarWindow" state="done"/>
		<finalState objName="Bridge" state="nothing"/>
		<finalState objName="Door" state="done"/>
	</finalStates>
	
	<slidersMap>
		<slider layerName="slider_R55_Debris" id="cat"/>
		<slider layerName="slider_R54_Debris" id="bridge2"/>
	</slidersMap>
	
	<animations>
		<animation name="DavidAnim" type="once" zpos="200" crossfade="1">
			<frames>
				<frame memberName="d1 copy_anim" frameDelay="500"/>
				<frame memberName="d2 copy_anim" frameDelay="500"/>
				<frame memberName="d3 copy 2_anim" frameDelay="500"/>
			</frames>
		</animation>
	</animations>
	
	<zoomWindows>
		<zoomWindow name="TruckWindow" file="ZoomWindows\BridgeOut_Z1.dir" visible="0" hotspot="point(707, 485)"/>
		<zoomWindow name="CarWindow" file="ZoomWindows\BridgeOut_Z2.dir" visible="0" hotspot="point(95, 522)"/>
	</zoomWindows>
	
	<challengeWindows>
		<challengeWindow name="ChallengeWindow" challenge="level_6_challenge" reward="level_6_reward" file="ZoomWindows\BridgeOut_ZC.dir">
			<clickStrategy type="rect" left="510" top="295" right="675" bottom="420"/>
		</challengeWindow>
	</challengeWindows>
	
	<objects>
		<object name="Ambience">
			<states>
				<state name="Ambience">
					<onStateEnter>
						<action target="Scene" name="PlaySound" param="S-30"/>
					</onStateEnter>
				</state>
			</states>
		</object>

		<object name="TruckWindow">
			<clickStrategy type="rect" left="608" top="445" right="807" bottom="525"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="TruckWindow"/>
						<action target="TruckWindow" 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="TruckWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="CarWindow">
			<clickStrategy type="rect" left="50" top="450" right="140" bottom="595"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="CarWindow"/>
						<action target="CarWindow" 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="CarWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="Bridge">
			<clickStrategy type="rect" left="510" top="295" right="675" bottom="420"/>
			<states>
				<state name="idle">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="bridge_click"/>
					</onClick>
				</state>
				
				<state name="nothing">
				</state>
			</states>
		</object>
		
		<object name="Door">
			<clickStrategy type="alpha" layer="door open"/>
			<states>
				<state name="locked">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="door open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="door_click"/>
						<action target="CarWindow" name="SendEvent" param="reveal"/>
						<action target="TruckWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Ram">
						<action target="Scene" name="RemoveFromInventory" param="Ram"/>
						<action target="Door" name="SetState" param="smashed"/>
						<action target="Scene" name="PlaySound" param="p-026" delay="1000"/>
						<action target="Scene" name="StepComplete" param=""/>
						
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1500"/>
					</onUseObject>
				</state>
				
				<state name="smashed">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="door open" delay="1500"/>
					</onStateEnter>
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="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>

