<screen src="swfs/screens/Floor2/Bridge_Access.swf" footstep="CobbleStone">
	<warning id="LOCATION_FLOOR2_BRIDGE_ACCESS"/>
	<unlockRoom id="Floor2/BRIDGE_ACCESS"/>
	
	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="false" />
		<music src="Audio/Music/FLOOR2/DARK_HALLWAYS.mp3" fadeIn="10000" channel="MUSIC" loop="true"/>
	</state>
	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="true" />
		<music src="Audio/Music/FLOOR2/LIGHTS_ON.mp3" fadeIn="10000" channel="MUSIC" loop="true"/>
	</state>
	
	
	<property type="visible" value="false" assign="object_window" name="alan" />
	<property type="visible" value="false" assign="object_window" name="Darkness" />
	<state>
		<requirement type="session" id="M5_BRIDGE_ACCESS_ALAN" value="false" />
		<sound src="Audio/SFX/FLOOR2/bridge_access_alan_first.mp3" />
		<property type="visible" value="true" assign="object_window" name="alan" />
		<session id="M5_BRIDGE_ACCESS_ALAN"/>
	</state>
	<state>
		<requirement type="session" id="M5_ALAN_DIALOGUE_1_VIEWED" value="false" />
		<property type="visible" value="true" assign="object_window" name="alan" />
	</state>
	<state>
		<requirement type="session" id="M5_ALAN_DIALOGUE_1_VIEWED" value="true" />
		<requirement type="session" id="M5_GENERATOR_MANUAL_VIEWED" value="false" />
		<property type="visible" value="true" assign="object_window" name="alan" />
		<delay time="1500" force="true"/>
		
		<speech>
			<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_12" audio="Audio/Speech/Floor2/Bridge Access/5_16_12.mp3" />
			<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_13" audio="Audio/Speech/Floor2/Bridge Access/5_16_12b.mp3" />
			<finish>
				<property type="visible" value="false" assign="object_window" name="alan" />
				<cinematic id="GOT_GENERATOR_MANUAL"/>
				<session id="M5_GENERATOR_MANUAL_VIEWED"/>
			</finish>		
		</speech>
	</state>
	
	<object name="alan" id="ALAN" cursor="hand">
		<event type="clicked">
			<requirement type="session" id="M5_ALAN_DIALOGUE_1_VIEWED" value="false" />
			
			<speech>
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_1" audio="Audio/Speech/Floor2/Bridge Access/5_16_1.mp3" />
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_2" audio="Audio/Speech/Floor2/Bridge Access/5_16_2.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_3" audio="Audio/Speech/Floor2/Bridge Access/5_16_3.mp3" />
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_4" audio="Audio/Speech/Floor2/Bridge Access/5_16_4.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_5" audio="Audio/Speech/Floor2/Bridge Access/5_16_5.mp3" />
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_6" audio="Audio/Speech/Floor2/Bridge Access/5_16_6.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_7" audio="Audio/Speech/Floor2/Bridge Access/5_16_7.mp3" />
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_8" audio="Audio/Speech/Floor2/Bridge Access/5_16_8.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_9" audio="Audio/Speech/Floor2/Bridge Access/5_16_9.mp3" />
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_10" audio="Audio/Speech/Floor2/Bridge Access/5_16_10.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_11" audio="Audio/Speech/Floor2/Bridge Access/5_16_11.mp3" />
				
				<finish>	
					<session id="M5_ALAN_DIALOGUE_1_VIEWED"/>
					<newChapter id="5"/>
					<newChapter id="6"/>
					<show_book tab="4"/>
					
					<session id="M5_GOT_GENERATOR_MANUAL"/>
					<goal id="TASK_5_4" remove="true" />
					<goal id="TASK_5_5" priority="1" />
					<item remove="true" id="GENERATOR_MANUAL" />	
						<!--<speech>
							<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_12" audio="Audio/Speech/Floor2/Bridge Access/5_16_12.mp3" />
							<text src="images/characters/alan.png" speaker_name="ALAN" string="M5_ALAN_CHRISTINE_BRIDGE_ACCESS_13" audio="Audio/Speech/Floor2/Bridge Access/5_16_12b.mp3" />
							<finish>
								<property type="visible" value="false" assign="object_window" name="alan" />
								<cinematic id="GOT_GENERATOR_MANUAL"/>
							</finish>		
						</speech>-->
					
				</finish>
			</speech>
		</event>
	</object>
	<!--<state>
		<requirement type="session" id="M5_ALAN_DIALOGUE_1_VIEWED" value="false" />
		<cinematic id="ALAN_DIALOGUE_1" />
		<session id="M5_ALAN_DIALOGUE_1_VIEWED"/>
		<item name="generator_manual" id="GENERATOR_MANUAL" src="images/items/generator_manual.png" large_src="images/items/generator_manual_large.png"/>
		<items_collected>
			<session id="M5_GOT_GENERATOR_MANUAL"/>
			<goal id="TASK_5_4" remove="true" />
			<goal id="TASK_5_5" priority="1" />
		</items_collected>
	</state>-->
	
	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="false" />
		<property type="visible" value="true" assign="object_window" name="Darkness" />
	</state>
	
	<state>
		<requirement type="session" id="M6_BLOOD_LAB_UNLOCKED" value="false" />
		<property type="visible" value="false" assign="object_window" name="Right_Door" />
		<property type="visible" value="false" assign="object_window" name="blood_dust" />
	</state>
	<state>
		<requirement type="session" id="M6_CLOSET_OPENED" value="false" />
		<property type="visible" value="false" assign="object_window" name="Janitor" />
	</state>
	 
	
	<object name="nav_Hallway7" id="NAV_HALLWAY7" cursor="south" tooltip="LOCATION_HALLWAY7_TO">
		<event type="clicked">
			<portal target="Floor2/HALLWAY_7"/> 
		</event> 				
	</object>
	<object name="nav_blood_lab" id="NAV_BLOOD_LAB" cursor="spyglass">
		
		<state>
			<requirement type="session" id="M6_BLOOD_LAB_UNLOCKED" />
			<object name="nav_blood_lab" id="NAV_BLOOD_LAB" cursor="east" tooltip="LOCATION_BLOOD_LAB_TO"/>
		</state>
		<event type="clicked">
			<requirement type="session" id="M6_BLOOD_LAB_UNLOCKED" />
			<portal target="Floor2/BLOOD_SAMPLE_ROOM"/> 
		</event> 	
		<event type="clicked">
			<requirement type="session" id="M6_BLOOD_LAB_UNLOCKED" value="false" />
			<requirement type="session" id="M5_POWER_RESTORED" value="false" />
			<warning id="ERROR_ROOM_TOO_DARK"/>
		</event> 		
		<event type="clicked">
			<requirement type="session" id="M6_BLOOD_LAB_UNLOCKED" value="false" />
			<requirement type="session" id="M5_POWER_RESTORED" value="true" />
			<window src="swfs/windows/blood_lab_door.swf">
				<property type="visible" value="false" assign="object_window" name="green" />
				
				<event type="clicked">
					<requirement type="holding_item" id="BLOOD_LAB_ID" warning="NEED_BLOOD_LAB_ID" />
					<sound src="Audio/SFX/FLOOR1/pharmacy_card_swipe.mp3" />
					
					<property type="frame" value="activate" stop="false" assign="object_window" name="card" />					
					
				</event> 
				
				<object name="card">
					<event type="frame" value="green">			
						<item remove="true" id="BLOOD_LAB_ID" />
						<session id="M6_BLOOD_LAB_UNLOCKED" />
						<property type="visible" value="true" assign="object_window" name="green" />
						<property type="visible" value="false" assign="object_window" name="red" />					
						<fadeIn assign="active_screen" name="Right_Door" />
						<property type="visible" value="true" assign="active_screen" name="blood_dust" />
						
						
					</event>
					<event type="frame" value="done">
						<object name="nav_blood_lab" id="NAV_BLOOD_LAB" assign="active_screen" cursor="east" tooltip="LOCATION_BLOOD_LAB_TO"/>
						<closeWindow/>
					</event>
				</object>
				<event type="frame" value="green">					
					<property type="visible" value="true" assign="object_window" name="green" />
					<property type="visible" value="false" assign="object_window" name="red" />					
					<fadeIn assign="active_screen" name="Right_Door" />
					<property type="visible" value="true" assign="active_screen" name="blood_dust" />
					<delay time="800"/>
					<closeWindow/>
				</event>
			</window>
		</event> 				
	</object>
	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="false" />
		<object name="nav_blood_lab" cursor="hand" tooltip="" />
	</state>



	<state>
		<requirement type="session" id="M6_GOT_AUDIOTAPE_13" value="true" />
		<requirement type="session" id="M6_GOT_FEATHER_DUSTER" value="true" />
		<property type="visible" value="false" assign="active_screen" name="broom_closet" />
	</state>

	<object name="broom_closet" id="BROOM_CLOSET" cursor="spyglass">
		<state>
			<requirement type="session" id="M6_GOT_SCALPEL" value="true"/>
			<requirement type="session" id="M6_GOT_FEATHER_DUSTER" value="false"/>			
			<poi value="on" target="active_screen" object="broom_closet" align="origin" type="single" />
		</state>
		<state>
			<requirement type="session" id="M6_GOT_FEATHER_DUSTER" value="true"/>	
			<requirement type="session" id="M6_GOT_AUDIOTAPE_13" value="true"/>	
			<object name="broom_closet" id="BROOM_CLOSET" cursor="hand"/>
		</state>
		<event type="clicked">
			<requirement type="session" id="M5_POWER_RESTORED" value="false" />			
			<warning id="CANT_SEE_WINDOW_TOO_DARK"/>
		</event>	
			
			
			
		<event type="clicked">	
			
			<requirement type="session" id="M5_POWER_RESTORED" value="true" />
			<window src="swfs/windows/broom_closet.swf">
				<state>
					<requirement type="session" id="M6_CLOSET_OPENED" value="true"/>
					<property type="visible" value="false" assign="object_window" name="door" />
					<property type="visible" value="false" assign="object_window" name="twine" />
					<property type="visible" value="false" assign="object_window" name="area" />
				</state>
				<state>
					<requirement type="session" id="M6_GOT_AUDIOTAPE_13"/>
					<property type="visible" value="false" assign="object_window" name="audio_cassette" />
				</state>
				<state>
					<requirement type="session" id="M6_GOT_FEATHER_DUSTER"/>
					<property type="visible" value="false" assign="object_window" name="FeatherDuster" />
				</state>
				<object name="FeatherDuster" cursor="hand">
					<event type="clicked">	
						<property type="visible" value="false" assign="object_window" name="FeatherDuster" />
						<item name="feather_duster" id="FEATHER_DUSTER" src="images/items/feather_duster.png" large_src="images/items/feather_duster_large.png"/>
						<items_collected>							
							<session id="M6_GOT_FEATHER_DUSTER"/>
							<!--<object name="broom_closet" id="BROOM_CLOSET" assign="active_screen" cursor="default"/>-->
							<poi value="off" target="active_screen" object="broom_closet"/>
							<requirement type="session" id="M6_GOT_AUDIOTAPE_13"/>
							<property type="visible" value="false" assign="active_screen" name="broom_closet" />
							<closeWindow/>
						</items_collected>
					</event>
				</object> 
				<object name="audio_cassette" cursor="hand">
					<event type="clicked">
						<property type="visible" value="false" assign="object_window" name="audio_cassette" />
						<unlockAudioTape id="13"/>
						<session id="M6_GOT_AUDIOTAPE_13"/> 
						<show_book tab="3"/>
						<state>
							<requirement type="session" id="M6_GOT_FEATHER_DUSTER"/>
							<property type="visible" value="false" assign="active_screen" name="broom_closet" />
							<closeWindow/>
						</state>
						
						<sound src="Audio/SFX/GAME/tape_collected.mp3" />
						
						
					</event>
					
				</object>
					
				<object name="area" cursor="hand">
					<event type="clicked">
						<requirement type="session" id="M6_CLOSET_OPENED" value="false"/>
						<requirement type="holding_item" id="SCALPEL" warning="M6_CLOSET_DOOR_NEED_SCALPEL" />						
						<property type="frame" value="activate" stop="false" assign="object_window" name="twine" />							
						
					</event>
				</object>
				
				<object name="twine" cursor="hand">
					<event type="frame" value="cut">
						<sound src="Audio/SFX/FLOOR2/scalpel_cutting_twine.mp3" />
					</event>
					<event type="frame" value="done">
						<session id="M6_CLOSET_OPENED"/>
						<property type="visible" value="false" assign="object_window" name="area" />
						<item remove="true" id="SCALPEL"/>
						<sound src="Audio/SFX/FLOOR2/closet_door_open.mp3" />
						<fadeIn assign="active_screen" name="Janitor" />
						<fadeOut assign="object_window" name="twine" />
						<fadeOut assign="object_window" name="door" />
					</event>
				</object>
					
			</window>
		</event>
	</object>

	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="false" />
		<object name="broom_closet" cursor="hand" tooltip="" />
	</state>
		
	
	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="true" />
		<state>
			<requirement type="session" id="M6_GOT_DARK_AGATE_STONE" value="false" />	
			<goal id="TASK_6_5" priority="3" />
		</state>
		<state>
			<requirement type="session" id="M6_GOT_FIRE_AGATE_STONE" value="false" />	
			<goal id="TASK_6_5" priority="3" />
		</state>
		<state>
			<requirement type="session" id="M6_GOT_FROST_AGATE_STONE" value="false" />	
			<goal id="TASK_6_5" priority="3" />
		</state>
	</state>
	<state>
		<requirement type="session" id="M6_DEMON_DOOR_OPENED" value="false" />
		<property type="visible" value="false" assign="object_window" name="Back_Door" />
	</state>

	<object name="nav_prison_bridge" id="NAV_PRISON_BRIDGE" cursor="spyglass">
		<state>
			<requirement type="session" id="M6_DEMON_DOOR_OPENED"/>
			<object name="nav_prison_bridge" id="NAV_PRISON_BRIDGE" cursor="north" tooltip="LOCATION_PRISON_BRIDGE_TO"/>
		</state>
		
		<event type="clicked">
			<requirement type="session" id="M6_DEMON_DOOR_OPENED"/>
			<portal target="Prison/PRISON_BRIDGE"/>
		</event> 	
		<event type="clicked">
			<requirement type="session" id="M6_DEMON_DOOR_OPENED" value="false" />
			<requirement type="session" id="M5_POWER_RESTORED" value="false" />
			<warning id="ERROR_ROOM_TOO_DARK"/>
		</event> 
		<event type="clicked">
			<requirement type="session" id="M6_DEMON_DOOR_OPENED" value="false" />
			<requirement type="session" id="M5_POWER_RESTORED" value="true" />
			<window src="swfs/windows/demon_door.swf">
				
				
				<state>
					<requirement type="session" id="M6_FROST_AGATE_STONE_INSERTED"/>					
					<property type="visible" value="false" assign="object_window" name="lock_1" />
				</state>
				<state>
					<requirement type="session" id="M6_FIRE_AGATE_STONE_INSERTED"/>					
					<property type="visible" value="false" assign="object_window" name="lock_2" />
				</state>	
				<state>
					<requirement type="session" id="M6_DARK_AGATE_STONE_INSERTED"/>					
					<property type="visible" value="false" assign="object_window" name="lock_3" />
				</state>
				
				<state>
					<requirement type="session" id="M6_FROST_AGATE_STONE_INSERTED" value="false" />					
					<property type="visible" value="false" assign="object_window" name="unlock_1" />
					<property type="visible" value="false" assign="object_window" name="ice_gem" />
				</state>
				<state>
					<requirement type="session" id="M6_FIRE_AGATE_STONE_INSERTED" value="false" />					
					<property type="visible" value="false" assign="object_window" name="unlock_2" />
					<property type="visible" value="false" assign="object_window" name="fire_gem" />
				</state>	
				<state>
					<requirement type="session" id="M6_DARK_AGATE_STONE_INSERTED" value="false" />					
					<property type="visible" value="false" assign="object_window" name="unlock_3" />
					<property type="visible" value="false" assign="object_window" name="abyss_gem" />
				</state>
					
				
				
				<object name="wheel" >
					<event type="frame" value="done">						
						
						<sound src="Audio/SFX/FLOOR2/demon_door_open.mp3" />
						<delay time="1000"/>
						<closeWindow/>
					</event>
				</object>
				<event type="clicked">	
					<!--<requirement type="session" id="M6_FROST_AGATE_STONE_INSERTED" warning="Frost agate not inserted" />
					<requirement type="session" id="M6_FIRE_AGATE_STONE_INSERTED" warning="Fire agate not inserted"/>
					<requirement type="session" id="M6_DARK_AGATE_STONE_INSERTED" warning="Dark agate not inserted"/>-->
					<requirement type="session" id="M6_FROST_AGATE_STONE_INSERTED" warning="M6_DEMON_DOOR_MISSING_DEMONS" />
					<requirement type="session" id="M6_FIRE_AGATE_STONE_INSERTED" warning="M6_DEMON_DOOR_MISSING_DEMONS"/>
					<requirement type="session" id="M6_DARK_AGATE_STONE_INSERTED" warning="M6_DEMON_DOOR_MISSING_DEMONS"/>
					<session id="M6_DEMON_DOOR_OPENED"/>
					<property type="visible" value="true" assign="active_screen" name="Back_Door" />
					<goal id="TASK_6_9" remove="true" />
					<property type="frame" value="activate" stop="false" assign="object_window" name="wheel" />
					<object name="nav_prison_bridge" id="NAV_PRISON_BRIDGE" assign="active_screen" cursor="north" tooltip="LOCATION_PRISON_BRIDGE_TO"/>
						
					<sound src="Audio/SFX/FLOOR2/bridge_access_bridge_unlock.mp3" />
				</event>
				<event type="clicked">	
					<requirement type="holding_item" id="FROST_AGATE_STONE" />
					<item remove="true" id="FROST_AGATE_STONE" />
					<session id="M6_FROST_AGATE_STONE_INSERTED"/>
					<sound src="Audio/SFX/FLOOR2/bridge_access_place_stone.mp3" />
					<property type="visible" value="true" assign="object_window" name="unlock_1" />
					<property type="visible" value="true" assign="object_window" name="ice_gem" />					
					<property type="visible" value="false" assign="object_window" name="lock_1" />
				</event>
				<event type="clicked">	
					<requirement type="holding_item" id="FIRE_AGATE_STONE" />
					<item remove="true" id="FIRE_AGATE_STONE" />
					<session id="M6_FIRE_AGATE_STONE_INSERTED"/>
					<sound src="Audio/SFX/FLOOR2/bridge_access_place_stone.mp3" />
					<property type="visible" value="true" assign="object_window" name="unlock_2" />
					<property type="visible" value="true" assign="object_window" name="fire_gem" />
					<property type="visible" value="false" assign="object_window" name="lock_2" />
				</event>
				<event type="clicked">	
					<requirement type="holding_item" id="DARK_AGATE_STONE" />
					<item remove="true" id="DARK_AGATE_STONE" />
					<session id="M6_DARK_AGATE_STONE_INSERTED"/>
					<sound src="Audio/SFX/FLOOR2/bridge_access_place_stone.mp3" />
					<property type="visible" value="true" assign="object_window" name="unlock_3" />
					<property type="visible" value="true" assign="object_window" name="abyss_gem" />
					<property type="visible" value="false" assign="object_window" name="lock_3" />
				</event>
				
			</window>
		</event>
	</object>

	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="false" />
		<object name="nav_prison_bridge" cursor="hand" tooltip="" />
	</state>
	
	
<!--	<object id="LITTLE_GIRL" name="little_girl" cursor="speech" tooltip="NAME_LITTLE_GIRL">
		<event type="clicked">
			<state>
				<requirement type="session" id="M5_GOT_TOY" value="false"/>
				<speech src="images/characters/little_girl.png" speaker_name="NAME_LITTLE_GIRL">
					<text string="M5_LITTLE_GIRL_SPEECH_1"/>
					<state>
						<requirement type="session" id="M5_LITTLE_GIRL_EVENT" value="false"/>
						<session id="M5_LITTLE_GIRL_EVENT" />
					</state>				
				</speech>
			</state>
			<state>
				<requirement type="holding_item" id="TOY"/>		
				<speech src="images/characters/little_girl.png" speaker_name="NAME_LITTLE_GIRL">
					<text string="M5_LITTLE_GIRL_SPEECH_2"/>			
					<state>
						<requirement type="session" id="M5_LITTLE_GIRL_SECRET_IN_STAIRS" value="false"/>
						<session id="M5_LITTLE_GIRL_SECRET_IN_STAIRS" />
						<item remove="true" id="TOY" />
					</state>
				</speech>
			</state>
		</event>
	</object>-->
	
	
	<!--
	<state>
		<requirement type="session" id="ACTIVE_MISSION" value="6"/>
		<requirement type="session" id="SOLVED_HALLWAY_8" value="false"/>
		<poi value="on" target="active_screen" object="HO_area"/>
	</state>
	
	<object name="HO_area" id="HO_AREA" cursor="spyglass">
		<event type="clicked">
			<requirement type="session" id="ACTIVE_MISSION" value="6"/>
			<requirement type="session" id="SOLVED_HALLWAY_8" value="false"/>
			<portal target="HO_SCREEN/HO_HALLWAY_8" hidden_screen="true" /> 
		</event> 	 
	</object>
	-->
	<object name="area1" id="AREA1" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="BRIDGE_ACCESS_AREA1"/>
		</event>		
	</object>
	<object name="area2" id="AREA2" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="BRIDGE_ACCESS_AREA2"/>
		</event>		
	</object>
	<object name="area3" id="AREA3" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="BRIDGE_ACCESS_AREA3"/>
		</event>		
	</object>
</screen>
