<scene name="ConvenientStore" numVictoryConditions="1" numSteps="5">
	<inventory>
		<object name="Screwdriver" memberName="HUD_screwdriver" acquired="0" visible="0"/>
		<object name="FirstAidKit" memberName="HUD_first aid kit" acquired="0" visible="0"/>
		<object name="StudFinder" memberName="HUD_stud finder" acquired="0" visible="0"/>
		<object name="Screw" memberName="HUD_screw" acquired="0" visible="0"/>
		<object name="TVStand" memberName="HUD_tv mount" acquired="0" visible="0"/>
		<object name="TruckStraps" memberName="HUD_truck straps" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="ShelfWindow" state="done"/>
		<finalState objName="CounterWindow" state="done"/>
		<finalState objName="TVStand" state="done"/>
		<finalState objName="ATM" state="lifted"/>
		<finalState objName="Person" state="done"/>
		<finalState objName="ReplayExitArea" state="replayExit"/>
	</finalStates>
	
	<animations>
		<animation name="TVStaticAnim" type="loop" xpos="272" ypos="167" zpos="8">
			<frames>
				<frame memberName="Convenience Store TV static_000_anim" frameDelay="60"/>
				<frame memberName="Convenience Store TV static_001_anim" frameDelay="60"/>
				<frame memberName="Convenience Store TV static_002_anim" frameDelay="60"/>
				<frame memberName="Convenience Store TV static_003_anim" frameDelay="60"/>
				<frame memberName="Convenience Store TV static_004_anim" frameDelay="60"/>
				<frame memberName="Convenience Store TV static_005_anim" frameDelay="60"/>
			</frames>
		</animation>
		
		<animation name="ATMAnim" type="once" zpos="7" crossfade="1">
			<frames>
				<frame memberName="atm01_anim" frameDelay="500"/>
				<frame memberName="atm02_anim" frameDelay="500"/>
				<frame memberName="atm03_anim" frameDelay="500"/>
				<frame memberName="atm04_anim" frameDelay="500"/>
				<frame memberName="atm05_anim" frameDelay="500"/>
			</frames>
		</animation>
		
		<animation name="ATMScreenDownAnim" type="loop" zpos="8">
			<frames>
				<frame memberName="down01_anim" frameDelay="80"/>
				<frame memberName="down02_anim" frameDelay="80"/>
				<frame memberName="down03_anim" frameDelay="80"/>
				<frame memberName="down04_anim" frameDelay="80"/>
				<frame memberName="down05_anim" frameDelay="80"/>
				<frame memberName="down06_anim" frameDelay="80"/>
				<frame memberName="down07_anim" frameDelay="80"/>
				<frame memberName="down08_anim" frameDelay="80"/>
				<frame memberName="down09_anim" frameDelay="80"/>
				<frame memberName="down10_anim" frameDelay="80"/>
				<frame memberName="down11_anim" frameDelay="80"/>
				<frame memberName="down12_anim" frameDelay="80"/>
				<frame memberName="down13_anim" frameDelay="80"/>
				<frame memberName="down14_anim" frameDelay="80"/>
				<frame memberName="down15_anim" frameDelay="80"/>
			</frames>
		</animation>
		
		<animation name="ATMScreenUpAnim" type="loop" zpos="8">
			<frames>
				<frame memberName="up01_anim" frameDelay="80"/>
				<frame memberName="up02_anim" frameDelay="80"/>
				<frame memberName="up03_anim" frameDelay="80"/>
				<frame memberName="up04_anim" frameDelay="80"/>
				<frame memberName="up05_anim" frameDelay="80"/>
				<frame memberName="up06_anim" frameDelay="80"/>
				<frame memberName="up07_anim" frameDelay="80"/>
				<frame memberName="up08_anim" frameDelay="80"/>
				<frame memberName="up09_anim" frameDelay="80"/>
				<frame memberName="up10_anim" frameDelay="80"/>
				<frame memberName="up11_anim" frameDelay="80"/>
				<frame memberName="up12_anim" frameDelay="80"/>
				<frame memberName="up13_anim" frameDelay="80"/>
				<frame memberName="up14_anim" frameDelay="80"/>
				<frame memberName="up15_anim" frameDelay="80"/>
				<frame memberName="up16_anim" frameDelay="80"/>
			</frames>
		</animation>
		
		<animation name="LegsAnim" type="once" zpos="9">
			<frames>
				<frame memberName="legs01_anim" frameDelay="80"/>
				<frame memberName="legs02_anim" frameDelay="80"/>
				<frame memberName="legs03_anim" frameDelay="80"/>
				<frame memberName="legs04_anim" frameDelay="80"/>
				<frame memberName="legs05_anim" frameDelay="80"/>
				<frame memberName="legs06_anim" frameDelay="80"/>
			</frames>
		</animation>
		
		<animation name="Light1Anim" type="loop" zpos="7">
			<frames>
				<frame memberName="spotlight1 glow_anim" frameDelay="1800" blend="100"/>
				<frame memberName="spotlight1 glow_anim" frameDelay="100" blend="20"/>
				<frame memberName="spotlight1 glow_anim" frameDelay="200" blend="100"/>
				<frame memberName="spotlight1 glow_anim" frameDelay="100" blend="20"/>
			</frames>
		</animation>
		
		<animation name="Light2Anim" type="loop" zpos="7">
			<frames>
				<frame memberName="spotlight2 glow_anim" frameDelay="1800" blend="100"/>
				<frame memberName="spotlight2 glow_anim" frameDelay="100" blend="20"/>
				<frame memberName="spotlight2 glow_anim" frameDelay="200" blend="100"/>
				<frame memberName="spotlight2 glow_anim" frameDelay="100" blend="20"/>
			</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>
		
		<animation name="ManAnim" type="once" zpos="200" crossfade="1">
			<frames>
				<frame memberName="guy_anim" frameDelay="500"/>
			</frames>
		</animation>
	</animations>
	
	<zoomWindows>
		<zoomWindow name="ShelfWindow" file="ZoomWindows\ConvenientStore_Z1.dir" visible="0" hotspot="point(867, 495)"/>
		<zoomWindow name="CounterWindow" file="ZoomWindows\ConvenientStore_Z2.dir" visible="0" hotspot="point(130, 430)"/>
	</zoomWindows>
	
	<objects>
		<object name="Ambience">
			<states>
				<state name="default">
					<onStateEnter>
						<action target="Scene" name="StartAnimation" param="Light1Anim"/>
						<action target="Scene" name="StartAnimation" param="Light2Anim"/>
						<action target="Scene" name="StartAnimation" param="TVStaticAnim"/>
						<action target="Scene" name="PlaySound" param="p-016_with_noise"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="ShelfWindow">
			<clickStrategy type="rect" left="754" top="390" right="960" bottom="630"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="ShelfWindow"/>
						<action target="ShelfWindow" 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="ShelfWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="CounterWindow">
			<clickStrategy type="rect" left="0" top="300" right="205" bottom="480"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="CounterWindow"/>
						<action target="CounterWindow" 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="CounterWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="TVStand">
			<clickStrategy type="alpha" layer="tv mount"/>
			<states>
				<state name="hidden">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="tv mount"/>
						<action target="Scene" name="HideLayer" param="studMarks"/>
						<action target="Scene" name="HideLayer" param="screw 1"/>
						<action target="Scene" name="HideLayer" param="screw 2"/>
						<action target="Scene" name="HideLayer" param="screw 3"/>
						<action target="Scene" name="PlaySound" param="S-31"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>

					<onClick>
						<action target="Scene" name="ShowDialog" param="secure_place_click"/>
					</onClick>
					
					<onUseObject name="StudFinder">
						<action target="Scene" name="RemoveFromInventory" param="StudFinder"/>
						<action target="TVStand" name="SetState" param="located"/>
						<action target="Scene" name="PlaySound" param="place_paper"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="located">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="studMarks"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>

					<onClick>
						<action target="Scene" name="ShowDialog" param="mark_click"/>
					</onClick>
					
					<onUseObject name="TVStand">
						<action target="Scene" name="RemoveFromInventory" param="TVStand"/>
						<action target="TVStand" name="SetState" param="hanging"/>
						<action target="Scene" name="PlaySound" param="use_the_knob_on_the_door"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="hanging">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="studMarks"/>
						<action target="Scene" name="ShowLayer" param="tv mount"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>

					<onClick>
						<action target="Scene" name="ShowDialog" param="unsecured_click"/>
					</onClick>
					
					<onUseObject name="TruckStraps">
						<action target="Scene" name="ShowDialog" param="unsecured_click"/>
					</onUseObject>
					
					<onUseObject name="Screwdriver">
						<action target="Scene" name="RemoveFromInventory" param="Screwdriver"/>
						<action target="TVStand" name="SetState" param="secured"/>
						<action target="ATM" name="SendEvent" param="tvMountSecured"/>
						<action target="Scene" name="PlaySound" param="p-013"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="secured">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="screw 1"/>
						<action target="Scene" name="ShowLayer" param="screw 2"/>
						<action target="Scene" name="ShowLayer" param="screw 3"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="stand_click"/>
					</onClick>
					
					<onUseObject name="TruckStraps">
						<action target="Scene" name="RemoveFromInventory" param="TruckStraps"/>
						<action target="ATM" name="SetState" param="lifted"/>
						<action target="TVStand" name="SetState" param="done"/>
						<action target="Scene" name="PlaySound" param="p-014"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="done">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="tv mount"/>
						<action target="Scene" name="ShowLayer" param="screw 1"/>
						<action target="Scene" name="ShowLayer" param="screw 2"/>
						<action target="Scene" name="ShowLayer" param="screw 3"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="ATM">
			<clickStrategy type="rect" left="207" top="290" right="380" bottom="450"/>
			<states>
				<state name="stuck">
					<onStateEnter>
						<action target="Scene" name="StartAnimation" param="ATMScreenDownAnim"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="atm_click"/>
						<action target="ShelfWindow" name="SendEvent" param="reveal"/>
						<action target="CounterWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onEvent name="tvMountSecured">
						<action target="ATM" name="SetState" param="liftable"/>
					</onEvent>
				</state>
				
				<state name="liftable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="atm_liftable"/>
					</onClick>
					
					<onUseObject name="TruckStraps">
						<action target="Scene" name="RemoveFromInventory" param="TruckStraps"/>
						<action target="ATM" name="SetState" param="lifted"/>
						<action target="TVStand" name="SetState" param="done"/>
						<action target="Scene" name="PlaySound" param="p-014"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="lifted">
					<onStateEnter>
						<action target="Scene" name="StartAnimation" param="ATMAnim"/>
						<action target="Scene" name="StopAnimation" param="ATMScreenDownAnim"/>
						<action target="Scene" name="StartAnimation" param="ATMScreenUpAnim" delay="2500"/>
						<action target="Person" name="SendEvent" param="freed"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Person">
			<clickStrategy type="rect" left="530" top="540" right="630" bottom="640"/>
			<states>
				<state name="stuck">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="person_click"/>
					</onClick>
					
					<onEvent name="freed">
						<action target="Person" name="SetState" param="freed"/>
					</onEvent>
					
					<onUseObject name="FirstAidKit">
						<action target="Scene" name="ShowDialog" param="no_first_aid"/>
					</onUseObject>
				</state>
				
				<state name="freed">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="free_person_click"/>
					</onClick>
										
					<onUseObject name="FirstAidKit">
						<action target="Scene" name="PlaySound" param="open_first_aid"/>
						<action target="Scene" name="RemoveFromInventory" param="FirstAidKit"/>
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="StartAnimation" param="ManAnim" delay="1000"/>
						<action target="Scene" name="StopAnimation" param="LegsAnim" delay="1000"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1500"/>
						<action target="Scene" name="StepComplete" param=""/>
						<action target="Person" name="SetState" param="done"/>
					</onUseObject>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="ReplayExitArea">	
			<clickStrategy type="rect" left="790" top="145" right="1020" bottom="635"/>
			<states>
				<state name="notAvailable">
				</state>
				
				<state name="replayExit">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ReplayExit" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>

