<scene name="Room1" numVictoryConditions="2">
	<inventory>
		<object name="Mirror" memberName="HUD_mirror" acquired="0" visible="1"/>
		<object name="Stand" memberName="HUD_stand" acquired="0" visible="1"/>
		<object name="Rope" memberName="HUD_rope" acquired="0" visible="1"/>
	</inventory>
	
	<finalStates>
		<finalState objName="Mirror" state="disabled"/>
		<finalState objName="Laser" state="blocked"/>
		<finalState objName="Stand" state="disabled"/>
		<finalState objName="Crate" state="openNoRope"/>
		<finalState objName="DinoHead" state="unblocked"/>
		<finalState objName="Pulley" state="disabled"/>
		<finalState objName="OpenDoor" state="open"/>
	</finalStates>
	
	<animations>
		<animation name="PulleyAnim" type="loop">
			<frames>
				<frame memberName="Pulley1_anim" frameDelay="4"/>
				<frame memberName="Pulley2_anim" frameDelay="4"/>
				<frame memberName="Pulley3_anim" frameDelay="4"/>
				<frame memberName="Pulley4_anim" frameDelay="4"/>
				<frame memberName="Pulley5_anim" frameDelay="4"/>
				<frame memberName="Pulley6_anim" frameDelay="4"/>
				<frame memberName="Pulley7_anim" frameDelay="4"/>
				<frame memberName="Pulley8_anim" frameDelay="4"/>
				<frame memberName="Pulley9_anim" frameDelay="4"/>
				<frame memberName="Pulley10_anim" frameDelay="4"/>
				<frame memberName="Pulley11_anim" frameDelay="4"/>
				<frame memberName="Pulley12_anim" frameDelay="4"/>
				<frame memberName="Pulley13_anim" frameDelay="4"/>
				<frame memberName="Pulley14_anim" frameDelay="4"/>
				<frame memberName="Pulley15_anim" frameDelay="4"/>
				<frame memberName="Pulley16_anim" frameDelay="4"/>
				<frame memberName="Pulley17_anim" frameDelay="4"/>
				<frame memberName="Pulley18_anim" frameDelay="4"/>
				<frame memberName="Pulley19_anim" frameDelay="4"/>
				<frame memberName="Pulley20_anim" frameDelay="4"/>
				<frame memberName="Pulley21_anim" frameDelay="4"/>
				<frame memberName="Pulley22_anim" frameDelay="4"/>
				<frame memberName="Pulley23_anim" frameDelay="4"/>
				<frame memberName="Pulley24_anim" frameDelay="4"/>
				<frame memberName="Pulley25_anim" frameDelay="4"/>
				<frame memberName="Pulley26_anim" frameDelay="4"/>
				<frame memberName="Pulley27_anim" frameDelay="4"/>
				<frame memberName="Pulley28_anim" frameDelay="4"/>
				<frame memberName="Pulley29_anim" frameDelay="4"/>
				<frame memberName="Pulley30_anim" frameDelay="4"/>
				<frame memberName="Pulley31_anim" frameDelay="4"/>
				<frame memberName="Pulley32_anim" frameDelay="4"/>
				<frame memberName="Pulley33_anim" frameDelay="4"/>
				<frame memberName="Pulley34_anim" frameDelay="4"/>
				<frame memberName="Pulley35_anim" frameDelay="4"/>
				<frame memberName="Pulley36_anim" frameDelay="4"/>
				<frame memberName="Pulley37_anim" frameDelay="4"/>
				<frame memberName="Pulley38_anim" frameDelay="4"/>
				<frame memberName="Pulley39_anim" frameDelay="4"/>
				<frame memberName="Pulley40_anim" frameDelay="4"/>
				<frame memberName="Pulley41_anim" frameDelay="4"/>
				<frame memberName="Pulley42_anim" frameDelay="4"/>
				<frame memberName="Pulley43_anim" frameDelay="4"/>
				<frame memberName="Pulley44_anim" frameDelay="4"/>
				<frame memberName="Pulley45_anim" frameDelay="4"/>
				<frame memberName="Pulley46_anim" frameDelay="4"/>
				<frame memberName="Pulley47_anim" frameDelay="4"/>
				<frame memberName="Pulley48_anim" frameDelay="4"/>
				<frame memberName="Pulley49_anim" frameDelay="4"/>
				<frame memberName="Pulley50_anim" frameDelay="4"/>
				<frame memberName="Pulley51_anim" frameDelay="4"/>
				<frame memberName="Pulley52_anim" frameDelay="4"/>
				<frame memberName="Pulley53_anim" frameDelay="4"/>
				<frame memberName="Pulley54_anim" frameDelay="4"/>
				<frame memberName="Pulley55_anim" frameDelay="4"/>
				<frame memberName="Pulley56_anim" frameDelay="4"/>
				<frame memberName="Pulley57_anim" frameDelay="4"/>
				<frame memberName="Pulley58_anim" frameDelay="4"/>
				<frame memberName="Pulley59_anim" frameDelay="4"/>
				<frame memberName="Pulley60_anim" frameDelay="4"/>
				<frame memberName="Pulley61_anim" frameDelay="4"/>
			</frames>
		</animation>
		
		<animation name="PlantAndMirrorAnim" type="loop" zpos="22">
			<frames>
				<frame memberName="PlantAndMirror1_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror2_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror3_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror4_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror5_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror6_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror7_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror8_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror9_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror10_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror11_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror12_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror13_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror14_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror15_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror16_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror17_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror18_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror19_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror20_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror21_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror22_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror23_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror24_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror25_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror26_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror27_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror28_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror29_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror30_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror31_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror32_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror33_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror34_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror35_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror36_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror37_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror38_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror39_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror40_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror41_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror42_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror43_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror44_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror45_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror46_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror47_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror48_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror49_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror50_anim" frameDelay="2"/>
				<frame memberName="PlantAndMirror51_anim" frameDelay="2"/>				
			</frames>
		</animation>
		
		<animation name="PlantNoMirrorAnim" type="loop" zpos="22">
			<frames>
				<frame memberName="PlantNoMirror1_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror2_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror3_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror4_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror5_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror6_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror7_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror8_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror9_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror10_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror11_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror12_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror13_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror14_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror15_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror16_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror17_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror18_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror19_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror20_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror21_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror22_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror23_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror24_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror25_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror26_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror27_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror28_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror29_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror30_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror31_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror32_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror33_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror34_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror35_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror36_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror37_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror38_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror39_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror40_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror41_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror42_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror43_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror44_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror45_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror46_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror47_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror48_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror49_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror50_anim" frameDelay="2"/>
				<frame memberName="PlantNoMirror51_anim" frameDelay="2"/>				
			</frames>
		</animation>
	</animations>
	
	<zoomWindows>
		<!--<zoomWindow name="LaserWindow" file="ZoomWindows\Room1_LaserWindow.dir" x="510" y="250" visible="0"/>-->
		<zoomWindow name="CrateWindow" file="ZoomWindows\Room1_CrateWindow.dir" x="548" y="462" visible="0"/>
	</zoomWindows>
	
	<objects>
		<object name="Mirror">
			<clickStrategy type="alpha" layer="Mirror"/>
			<states>
				<state name="clickable">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="Mirror"/>
						<action target="Scene" name="PlaySound" param="laser_loop"/>
						<action target="Scene" name="PlaySound" param="indoor_big2"/>
						<action target="Scene" name="StartAnimation" param="PlantAndMirrorAnim"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>

					<onClick>
						<action target="Scene" name="AddToInventory" param="Mirror"/>
						<action target="Scene" name="PlaySound" param="Item_Pickup_Ceramic_small"/>
						<action target="Mirror" name="SetState" param="disabled"/>						
						<action target="Scene" name="ShowTutorial" param="intro use mirror"/>
					</onClick>
				</state>

				<state name="disabled">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="Mirror"/>
						<action target="Scene" name="StopAnimation" param="PlantAndMirrorAnim"/>
						<action target="Scene" name="StartAnimation" param="PlantNoMirrorAnim"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Laser">		
			<clickStrategy type="rect" left="525" top="350" right="570" bottom="400"/>
			<states>
				<state name="active">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="Laser"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="laser_click"/>
					</onClick>
					
					<onUseObject name="Mirror">
						<action target="Laser" name="SetState" param="blocked"/>
						<action target="DinoHead" name="SetState" param="blocked"/>
						<action target="Pulley" name="SetState" param="clickable"/>
						<action target="Stand" name="SetState" param="clickable"/>
						<action target="Scene" name="RemoveFromInventory" param="Mirror"/>
						<action target="Scene" name="RegisterVictoryCondition" param=""/>
						<action target="Scene" name="PlaySound" param="use_mirror_on_the_laser_emmiter"/>
						<action target="Scene" name="ShowTutorial" param="intro get pole"/>
					</onUseObject>
				</state>
				
				<state name="blocked">	
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="Laser"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Stand">
			<clickStrategy type="alpha" layer="Stand"/>
			<states>
				<state name="unreachable">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="Stand"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="stand_unreachable"/>
					</onClick>
				</state>
				
				<state name="clickable">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="Stand"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="AddToInventory" param="Stand"/>
						<action target="Scene" name="PlaySound" param="pickup_stand"/>
						<action target="Stand" name="SetState" param="disabled"/>
						<action target="Scene" name="ShowTutorial" param="intro use pole on crate"/>
					</onClick>
				</state>
				
				<state name="disabled">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="Stand"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Crate">
			<clickStrategy type="alpha" layer="Crate"/>
			<states>
				<state name="closed">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="Crate"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="CrateWindow"/>
					</onClick>
					
					<onUseObject name="Stand">
						<action target="Crate" name="SetState" param="openWithRope"/>
						<action target="Scene" name="RemoveFromInventory" param="Stand"/>
						<action target="Scene" name="OpenWindow" param="CrateWindow"/>
						<action target="Scene" name="PlaySound" param="crate_shatter"/>
						<action target="Scene" name="ShowTutorial" param="intro see rope"/>
					</onUseObject>
					
					<onUseObject name="Mirror">
						<actiont target="Scene" name="ShowDialog" param="use_mirror_on_box"/>
					</onUseObject>
				</state>
				
				<state name="openWithRope">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="Crate"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="CrateWindow"/>
					</onClick>
				</state>
				
				<state name="openNoRope">				
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="Crate"/>
						<action target="Scene" name="PlaySound" param="Item_Pickup_Cloth_big"/>
						<action target="Scene" name="CloseWindow" param="CrateWindow"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="DinoHead">
			<clickStrategy type="rect" left="410" top="400" right="470" bottom="445"/>
			<states>
				<state name="waitForLaserToStop">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="DinoHead"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="dino_click"/>
					</onClick>
					
					<onUseObject name="Rope">
						<action target="Scene" name="ShowDialog" param="laser_warning"/>
					</onUseObject>			
				</state>
				
				<state name="blocked">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="DinoHead"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onUseObject name="Rope">
						<action target="DinoHead" name="SetState" param="unblocked"/>
						<action target="Scene" name="RemoveFromInventory" param="Rope"/>						
						<action target="Scene" name="PlaySound" param="attaching_rope_skull"/>
						<action target="OpenDoor" name="SetState" param="open"/>
						<action target="Scene" name="ShowTutorial" param="intro door open"/>						
					</onUseObject>
				</state>
				
				<state name="unblocked">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="DinoHead"/>
						<action target="Scene" name="StopAnimation" param="PulleyAnim"/>
					</onStateEnter>					
				</state>
			</states>
		</object>
		
		<object name="Pulley">
			<clickStrategy type="rect" left="460" top="110" right="500" bottom="165"/>
			<states>
				<state name="waitForLaserToStop">
					<onStateEnter>
						<action target="Scene" name="StartAnimation" param="PulleyAnim"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="pulley_click"/>
					</onClick>
					
					<onUseObject name="Rope">
						<action target="Scene" name="ShowDialog" param="laser_warning"/>
					</onUseObject>
				</state>
				
				<state name="clickable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="pulley_click"/>
					</onClick>
					
					<onUseObject name="Rope">
						<action target="DinoHead" name="SetState" param="unblocked"/>
						<action target="Scene" name="RemoveFromInventory" param="Rope"/>
						<action target="Scene" name="PlaySound" param="attaching_rope_skull"/>
						<action target="OpenDoor" name="SetState" param="open"/>
						<action target="Pulley" name="SetState" param="disabled"/>
						<action target="Scene" name="ShowTutorial" param="intro door open"/>
					</onUseObject>
				</state>
				
				<state name="disabled">
					<onStateEnter>
						<action target="Scene" name="StopAnimation" param="PulleyAnim"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="OpenDoor">
			<clickStrategy type="alpha" layer="OpenDoor"/>
			<states>
				<state name="closed">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="OpenDoor"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="noExit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="no_exit"/>
					</onClick>
				</state>
				
				<state name="open">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="OpenDoor"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="RegisterVictoryCondition" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>
