<scene name="FireEscape" numVictoryConditions="1" numSteps="3">
	<inventory>
		<object name="Wire" memberName="HUD_wire" acquired="0" visible="0"/>
		<object name="Elephant" memberName="HUD_elephant" acquired="0" visible="0"/>
		<object name="Pulley1" memberName="HUD_pulley01" acquired="0" visible="0"/>
		<object name="Pulley2" memberName="HUD_pulley02" acquired="0" visible="0"/>
		<object name="Pulley3" memberName="HUD_pulley03" acquired="0" visible="0"/>
		<object name="Pulley4" memberName="HUD_pulley04" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="PulleyWindow" state="done"/>
		<finalState objName="ElephantWindow" state="done"/>
		<finalState objName="Wire" state="placed"/>
		<finalState objName="Elephant" state="placed"/>
		<finalState objName="Ladder" state="done"/>
	</finalStates>
	
	<slidersMap>
		<slider layerName="slider_L70_Debris" id="bridge6"/>
		<slider layerName="owner_cat" id="cat_owner" rect="rect(458, 259, 519, 367)"/>
	</slidersMap>
	
	<animations>
		<animation name="LadderAnim" type="once">
			<frames>
				<frame memberName="ladder01_anim" frameDelay="128"/>
				<frame memberName="ladder02_anim" frameDelay="128"/>
				<frame memberName="ladder03_anim" frameDelay="128"/>
				<frame memberName="ladder04_anim" frameDelay="128"/>
				<frame memberName="ladder05_anim" frameDelay="128"/>
			</frames>
		</animation>
		
		<animation name="FireAnim" xpos="975" ypos="489" type="loop" ink="33">
			<frames>
				<frame memberName="FireEscape Car Fire_000_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_001_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_002_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_003_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_004_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_005_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_006_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_007_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_008_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_009_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_010_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_011_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_012_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_013_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_014_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_015_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_016_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_017_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_018_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_019_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_020_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_021_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_022_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_023_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_024_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_025_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_026_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_027_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_028_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_029_anim" frameDelay="33"/>
				<frame memberName="FireEscape Car Fire_030_anim" frameDelay="33"/>
			</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="PulleyWindow" file="ZoomWindows\FireEscape_Z1.dir" visible="0" hotspot="point(305, 580)"/>
		<zoomWindow name="ElephantWindow" file="ZoomWindows\FireEscape_Z2.dir" visible="0" hotspot="point(259, 387)"/>
	</zoomWindows>
	
	<objects>
		<object name="Ambience">
			<states>
				<state name="Ambience">
					<onStateEnter>
						<action target="Scene" name="StartAnimation" param="FireAnim"/>
						<action target="Scene" name="PlaySound" param="S-30"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="PulleyWindow">
			<clickStrategy type="rect" left="210" top="530" right="400" bottom="630"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="PulleyWindow"/>
						<action target="PulleyWindow" 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="PulleyWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="ElephantWindow">
			<clickStrategy type="rect" left="210" top="80" right="290" bottom="430"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="ElephantWindow"/>
						<action target="ElephantWindow" 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="ElephantWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="Wire">
			<states>
				<state name="notPlaced">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="wire02"/>
					</onStateEnter>
					
					<onEvent name="wire_placed">
						<action target="Scene" name="RemoveFromInventory" param="Wire"/>
						<action target="Wire" name="SetState" param="placed"/>
						<action target="Elephant" name="SendEvent" param="wire_placed"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onEvent>
				</state>
				
				<state name="placed">
					<onStateEnter> 
						<action target="Scene" name="ShowLayer" param="wire02"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Elephant">
			<clickStrategy type="rect" left="395" top="138" right="470" bottom="225"/>
			<states>
				<state name="noWire">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="elephant"/>
					</onStateEnter>
					
					<onEvent name="wire_placed">
						<action target="Elephant" name="SetState" param="placeable"/>
					</onEvent>
				</state>
				
				<state name="placeable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="need_elephant"/>
					</onClick>
					
					<onUseObject name="Elephant">
						<action target="Scene" name="RemoveFromInventory" param="Elephant"/>
						<action target="Elephant" name="SetState" param="placed"/>
						<action target="Ladder" name="SendEvent" param="weight_placed"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="placed">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="elephant"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Ladder">
			<clickStrategy type="rect" left="670" top="85" right="795" bottom="620"/>
			<states>
				<state name="stuck">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>	
						<action target="Scene" name="ShowDialog" param="ladder_click"/>
						<action target="PulleyWindow" name="SendEvent" param="reveal"/>
						<action target="ElephantWindow" name="SendEvent" param="reveal"/>
						<action target="Scene" name="PlaySound" param="p-043"/>
					</onClick>
				
					<onEvent name="weight_placed">
						<action target="Ladder" name="SetState" param="unstuck"/>
					</onEvent>
				</state>
				
				<state name="unstuck">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Ladder" name="SetState" param="dropping"/>
						<action target="Scene" name="PlaySound" param="p-045"/>
						<action target="PulleyWindow" name="SendEvent" param="reveal"/>
						<action target="ElephantWindow" name="SendEvent" param="reveal"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onClick>
				</state>
				
				<state name="dropping">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="ladder"/>
						<action target="Scene" name="HideLayer" param="weight"/>
						<action target="Scene" name="HideLayer" param="wire01"/>
						<action target="Scene" name="HideLayer" param="elephant"/>
						<action target="Scene" name="HideLayer" param="wire02"/>
						<action target="Scene" name="HideLayer" param="pulley BOTT 03"/>
						<action target="Scene" name="HideLayer" param="pulley BOTT 02"/>
						<action target="Scene" name="HideLayer" param="pulley BOTT 01"/>
						<action target="Scene" name="HideLayer" param="pulley TOP 03"/>
						<action target="Scene" name="HideLayer" param="pulley TOP 02"/>
						<action target="Scene" name="HideLayer" param="pulley TOP 01"/>
						<action target="Scene" name="StartAnimation" param="LadderAnim"/>
						<action target="Ladder" name="SetState" param="exitable" delay="1000"/>
					</onStateEnter>
				</state>
				
				<state name="exitable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Ladder" name="SetState" param="ddone"/>
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="PlaySound" param="p-046"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1500"/>
					</onClick>
				</state>
				
				<state name="ddone">
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="ladder"/>
						<action target="Scene" name="HideLayer" param="weight"/>
						<action target="Scene" name="HideLayer" param="wire01"/>
						<action target="Scene" name="HideLayer" param="elephant"/>
						<action target="Scene" name="HideLayer" param="wire02"/>
						<action target="Scene" name="HideLayer" param="pulley BOTT 03"/>
						<action target="Scene" name="HideLayer" param="pulley BOTT 02"/>
						<action target="Scene" name="HideLayer" param="pulley BOTT 01"/>
						<action target="Scene" name="HideLayer" param="pulley TOP 03"/>
						<action target="Scene" name="HideLayer" param="pulley TOP 02"/>
						<action target="Scene" name="HideLayer" param="pulley TOP 01"/>
						<action target="Scene" name="StartAnimation" param="LadderAnim"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ReplayExit" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>