<scene name="RoofJump" numVictoryConditions="1" numSteps="3">
	<inventory>
		<object name="Keys" memberName="HUD_keys" acquired="0" visible="0"/>
		<object name="TShirt" memberName="HUD_T-shirt02" acquired="0" visible="0"/>
		<object name="TShirts" memberName="HUD_TShirts" acquired="0" visible="0">
			<onUseObject name="Fan">
				<action target="Scene" name="RemoveFromInventory" param="Fan"/>
				<action target="Scene" name="RemoveFromInventory" param="TShirts"/>
				<action target="Scene" name="AddToInventory" param="Rope"/>
				<action target="Scene" name="StepComplete" param=""/>
			</onUseObject>
		</object>
		<object name="Fan" memberName="HUD_fan" acquired="0" visible="0">
			<onUseObject name="TShirts">
				<action target="Scene" name="RemoveFromInventory" param="Fan"/>
				<action target="Scene" name="RemoveFromInventory" param="TShirts"/>
				<action target="Scene" name="AddToInventory" param="Rope"/>
				<action target="Scene" name="StepComplete" param=""/>
			</onUseObject>
		</object>
		<object name="Rope" memberName="HUD_T-shirt+fan" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="ClothesWindow" state="done"/>
		<finalState objName="FanWindow" state="done"/>
		<finalState objName="Rope" state="replayExit"/>
	</finalStates>
	
	<slidersMap>
		<slider layerName="slider_L44_Debris" id="teddy_bear"/>
	</slidersMap>
	
	<animations>
		<animation name="LetterEAnim" type="loop" zpos="8">
			<frames>
				<frame memberName="E01_anim" frameDelay="100"/>
				<frame memberName="E02_anim" frameDelay="100"/>
				<frame memberName="E03_anim" frameDelay="100"/>
				<frame memberName="E04_anim" frameDelay="100"/>
				<frame memberName="E05_anim" frameDelay="100"/>
				<frame memberName="E06_anim" frameDelay="100"/>
				<frame memberName="E07_anim" frameDelay="100"/>
				<frame memberName="E08_anim" frameDelay="100"/>
				<frame memberName="E09_anim" frameDelay="100"/>
				<frame memberName="E08_anim" frameDelay="100"/>
				<frame memberName="E07_anim" frameDelay="100"/>
				<frame memberName="E06_anim" frameDelay="100"/>
				<frame memberName="E05_anim" frameDelay="100"/>
				<frame memberName="E04_anim" frameDelay="100"/>
				<frame memberName="E03_anim" frameDelay="100"/>
				<frame memberName="E02_anim" frameDelay="100"/>
				<frame memberName="E01_anim" frameDelay="100"/>
			</frames>
		</animation>
		<!--
		<animation name="AntennaAnim" type="loop" zpos="5">
			<frames>
				<frame memberName="antene01_anim" frameDelay="60"/>
				<frame memberName="antene02_anim" frameDelay="60"/>
				<frame memberName="antene03_anim" frameDelay="60"/>
				<frame memberName="antene04_anim" frameDelay="60"/>
				<frame memberName="antene05_anim" frameDelay="60"/>
				<frame memberName="antene06_anim" frameDelay="60"/>
				<frame memberName="antene07_anim" frameDelay="60"/>
				<frame memberName="antene08_anim" frameDelay="60"/>
				<frame memberName="antene09_anim" frameDelay="60"/>
				<frame memberName="antene10_anim" frameDelay="60"/>
				<frame memberName="antene11_anim" frameDelay="60"/>
				<frame memberName="antene12_anim" frameDelay="60"/>
				<frame memberName="antene13_anim" frameDelay="60"/>
				<frame memberName="antene12_anim" frameDelay="60"/>
				<frame memberName="antene11_anim" frameDelay="60"/>
				<frame memberName="antene10_anim" frameDelay="60"/>
				<frame memberName="antene09_anim" frameDelay="60"/>
				<frame memberName="antene08_anim" frameDelay="60"/>
				<frame memberName="antene07_anim" frameDelay="60"/>
				<frame memberName="antene06_anim" frameDelay="60"/>
				<frame memberName="antene05_anim" frameDelay="60"/>
				<frame memberName="antene04_anim" frameDelay="60"/>
				<frame memberName="antene03_anim" frameDelay="60"/>
				<frame memberName="antene02_anim" frameDelay="60"/>
				<frame memberName="antene01_anim" frameDelay="60"/>
			</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="ClothesWindow" file="ZoomWindows\RoofJump_Z1.dir" visible="0" hotspot="point(682, 513)"/>
		<zoomWindow name="FanWindow" file="ZoomWindows\RoofJump_Z2.dir" visible="0" hotspot="point(200, 530)"/>
	</zoomWindows>
	
	<objects>
		<object name="Ambience">
			<states>
				<state name="Ambience">
					<onStateEnter>
						<!--<action target="Scene" name="StartAnimation" param="AntennaAnim"/>-->
						<action target="Scene" name="StartAnimation" param="LetterEAnim"/>
						<action target="Scene" name="PlaySound" param="p-031"/>
						<action target="Scene" name="PlaySound" param="p-032"/>
					</onStateEnter>
				</state>
			</states>
		</object>

		<object name="ClothesWindow">
			<clickStrategy type="rect" left="635" top="472" right="730" bottom="555"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="ClothesWindow"/>
						<action target="ClothesWindow" name="SetState" param="visible"/>
					</onEvent>
				</state>
				
				<state name="visible">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="ClothesWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="FanWindow">
			<clickStrategy type="alpha" layer="panel open"/>
			<states>
				<state name="secured">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="panel open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="panel_click"/>
					</onClick>
					
					<onUseObject name="Keys">
						<action target="Scene" name="RemoveFromInventory" param="Keys"/>
						<action target="FanWindow" name="SetState" param="open"/>
						<action target="Scene" name="RevealHotspot" param="FanWindow"/>
						<action target="Scene" name="PlaySound" param="p-033"/>
						<action target="Scene" name="PlaySound" param="p-034" delay="200"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="open">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="panel open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="FanWindow"/>
					</onClick>
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="panel open"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Rope">
			<clickStrategy type="rect" left="340" top="220" right="520" bottom="460"/>
			<states>
				<state name="noRope">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="T-shirts+fan"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="gap_click"/>
						<action target="ClothesWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Rope">
						<action target="Scene" name="RemoveFromInventory" param="Rope"/>
						<action target="Rope" name="SetState" param="withRope"/>
						<action target="Scene" name="PlaySound" param="p-036"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="withRope">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="T-shirts+fan"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Rope" name="SetState" param="done"/>
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1500"/>
					</onClick>
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="T-shirts+fan"/>
					</onStateEnter>
				</state>
				
				<state name="replayExit">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="T-shirts+fan"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ReplayExit" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>

