<screen src="swfs/screens/Prison/Alans_Office.swf" footstep="Wood">
	<warning id="LOCATION_PRISON_ALANS_OFFICE"/>
	<unlockRoom id="Prison/ALANS_OFFICE"/>
	
	<music src="Audio/Music/PRISON/SECRET_LAB.mp3" fadeIn="10000" channel="MUSIC" loop="true"/>
	<!--<property type="visible" value="false" assign="active_screen" name="HO_area" />-->
	<state>
		<requirement type="session" id="GOT_VICTORS_OFFICE_KEY" value="true"/>
		<property type="visible" value="false" assign="object_window" name="alan" />
	</state>
	
	<state>
		<requirement type="session" id="M7_GOT_NAIL" value="true"/>
		<requirement type="session" id="M7_GOT_AUDIO_TAPE_15" value="false"/>
		<poi value="on" target="active_screen" object="box" align="origin" type="single" />		
	</state>
	
	
	<state>
		<requirement type="session" id="SOLVED_ALANS_OFFICE" value="false"/>
		<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="true" />
		<poi value="on" target="active_screen" object="HO_area" align="origin" />	
		<!--<property type="visible" value="true" assign="active_screen" name="HO_area" />-->
	</state>
	
	<state>
		<requirement type="session" id="ACTIVE_MISSION" value="7"/>
		<requirement type="session" id="SOLVED_ALANS_OFFICE" value="true"/>
		<requirement type="session" id="SOLVED_ALANS_OFFICE_2" value="false"/>
		<poi value="on" target="active_screen" object="HO_area" align="origin" />	
		<!--<property type="visible" value="true" assign="active_screen" name="HO_area" />-->
	</state>
	
	
	
	<object name="HO_area" id="HO_AREA" cursor="hand" tooltip="LOCATION_ALANS_DESK">
		<state>			
			<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="true"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE" value="false"/>
			<object name="HO_area" id="HO_AREA" cursor="spyglass"/>
		</state>
		<state>
			<requirement type="session" id="ACTIVE_MISSION" value="7"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE" value="true"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE_2" value="false"/>
			<object name="HO_area" id="HO_AREA" cursor="spyglass"/>
		</state>
		
		<event type="clicked">
			<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="true"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE" value="false"/>
			<portal target="HO_SCREEN/HO_ALANS_OFFICE" hidden_screen="true" />
		</event> 		
		<event type="clicked">
			<requirement type="session" id="ACTIVE_MISSION" value="7"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE" value="true"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE_2" value="false"/>
			<portal target="HO_SCREEN/HO_ALANS_OFFICE" hidden_screen="true" />
		</event> 
		<event type="clicked">
			<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="false"/>
			<warning id="ALANS_OFFICE_AREA4"/>
		</event>
		<event type="clicked">
			<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="true"/>
			<requirement type="session" id="ACTIVE_MISSION" value="6"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE" value="true"/>
			<warning id="ALANS_OFFICE_AREA4"/>
		</event>
		<event type="clicked">
			<requirement type="session" id="ACTIVE_MISSION" value="7"/>
			<requirement type="session" id="SOLVED_ALANS_OFFICE_2" value="true"/>
			<warning id="ALANS_OFFICE_AREA4"/>
		</event>
	</object>
	
	
	<object name="nav_back" id="NAV_BACK" cursor="south" tooltip="LOCATION_HALLWAY8_TO">
		<event type="clicked">
		
			<portal target="PRISON/HALLWAY_8"/>
		</event> 				
	</object>
	
	<!--<state>
		<requirement type="session" id="ALAN_DIALOGUE_VIEWED" value="false"/>
		<session id="ALAN_DIALOGUE_VIEWED"/>
		<cinematic id="ALAN_DIALOGUE"/>
		
	</state>-->
	
	<object name="alan" id="ALAN" cursor="hand">
		<event type="clicked">
			<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="false" />
			<speech>
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M6_ALAN_CHRISTINE_OFFICE_1" audio="Audio/Speech/Prison/AlansOffice/6_19_1.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_2"  audio="Audio/Speech/Prison/AlansOffice/6_19_2.mp3"/>
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M6_ALAN_CHRISTINE_OFFICE_3" audio="Audio/Speech/Prison/AlansOffice/6_19_3.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_4"  audio="Audio/Speech/Prison/AlansOffice/6_19_4.mp3"/>
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M6_ALAN_CHRISTINE_OFFICE_5" audio="Audio/Speech/Prison/AlansOffice/6_19_5.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_6"  audio="Audio/Speech/Prison/AlansOffice/6_19_6.mp3"/>
				<finish>				
					<session id="M6_ALAN_DIALOG_VIEWED_1"/>	
					<object name="HO_area" id="HO_AREA" assign="active_screen" cursor="spyglass"/>
					<property type="visible" value="true" assign="active_screen" name="HO_area" />
					<goal id="TASK_6_2" remove="true"/>
					<goal id="TASK_6_12" priority="6" />
					<poi value="on" target="active_screen" object="HO_area" align="origin" />
					<cinematic id="RETURN_WHEN_FOUND_RESEARCH"/>
				</finish>
			</speech>	
		</event>
		<event type="clicked">
			<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="true" />
			<speech>
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_7"  audio="Audio/Speech/Prison/AlansOffice/6_19_7.mp3"/>
				
			</speech>	
		</event>
		<event type="clicked">
			<requirement type="session" id="M6_ALAN_DIALOG_VIEWED_1" value="true" />
			<requirement type="session" id="GOT_ALANS_RESEARCH" value="true" />
			<requirement type="session" id="GOT_VICTORS_OFFICE_KEY" value="false" />
			<requirement type="holding_item" id="ALANS_RESEARCH"/>
			<goal id="TASK_6_12" remove="true" />
			<speech>
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_8"  audio="Audio/Speech/Prison/AlansOffice/6_20_1.mp3"/>
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M6_ALAN_CHRISTINE_OFFICE_9" audio="Audio/Speech/Prison/AlansOffice/6_20_2.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_10"  audio="Audio/Speech/Prison/AlansOffice/6_20_3.mp3"/>
				<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M6_ALAN_CHRISTINE_OFFICE_11" audio="Audio/Speech/Prison/AlansOffice/6_20_4.mp3" />
				<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_12"  audio="Audio/Speech/Prison/AlansOffice/6_20_5.mp3"/>
				<finish>				
					<item name="victors_office_key" id="VICTORS_OFFICE_KEY" src="images/items/victors_office_key.png" large_src="images/items/victors_office_key_large.png"/>
					<items_collected>
						<session id="GOT_VICTORS_OFFICE_KEY"/>
						<item remove="true" id="ALANS_RESEARCH" />
						<speech>
							<text src="images/characters/christine.png" speaker_name="CHRISTINE" string="M6_ALAN_CHRISTINE_OFFICE_13" audio="Audio/Speech/Prison/AlansOffice/6_20_6.mp3" />
							<text src="images/characters/alan.png" speaker_name="ALAN" string="M6_ALAN_CHRISTINE_OFFICE_14"  audio="Audio/Speech/Prison/AlansOffice/6_20_7.mp3"/>
							<finish>
								<property type="visible" value="false" assign="object_window" name="alan" />
								<cinematic id="SEARCH_VICTORS_OFFICE"/>
							</finish>
						</speech>
					</items_collected>				
				</finish>
			</speech>
			
			
			
			
		</event> 				
	</object>
	
	<property type="visible" value="false" assign="object_window" name="board" />
	<state>
		<requirement type="session" id="VIEWED_STORY_EVENT_21A" value="true" />
		<property type="visible" value="true" assign="object_window" name="board" />
	</state>
	<object name="board" id="BOARD" cursor="spyglass">
		<event type="clicked">
			<window src="swfs/windows/research_board.swf">
				<event type="clicked">
					<goal id="TASK_7_2" remove="true" />	
					<goal id="TASK_7_5" priority="12" />	
					<requirement type="holding_item" id="CHARGED_BLACKLIGHT" value="false" />
					<warning id="ALAN_RESEARCH_BOARD_FIND_MESSAGE"/>
				</event> 
			</window>
		</event> 				
	</object>
	
	<state>
		<requirement type="session" id="M7_NAIL_USED" value="false" />
		<property type="visible" value="false" assign="object_window" name="Box_open" />
		<property type="visible" value="false" assign="object_window" name="nail" />
	</state>
	<state>
		<requirement type="session" id="M7_NAIL_USED" value="true" />
		<property type="visible" value="false" assign="object_window" name="Box_close" />
		
	</state>
	<state>
		<requirement type="session" id="M7_GOT_AUDIO_TAPE_15" value="true" />
		<property type="visible" value="false" assign="object_window" name="box" />
	</state>
	
	<object name="Blimp" id="BLIMP" cursor="hand">
		<event type="clicked">
			<warning id="ALANS_OFFICE_AREA5"/>
		</event>
	</object>
	
	<object name="box" id="BOX" cursor="spyglass">
		<event type="clicked">
			<requirement type="session" id="M7_GOT_AUDIO_TAPE_15" value="false" />
			<window src="swfs/windows/shelf_box.swf">
				<state>
					<requirement type="session" id="M7_NAIL_USED" value="false" />
					<property type="visible" value="false" assign="object_window" name="lid_open" />
				</state>
				<state>
					<requirement type="session" id="M7_NAIL_USED" value="true" />
					<property type="visible" value="false" assign="object_window" name="lid_close" />
					<property type="frame" value="done" stop="true" assign="object_window" name="nail" />
				</state>
				<!--<event type="clicked">
					<requirement type="session" id="M7_NAIL_USED" value="false" />
					<requirement type="holding_item" id="NAIL" value="true" warning="Need nail" />
					<item remove="true" id="NAIL" />
					<property type="visible" value="true" assign="object_window" name="lid_open" />
					<property type="visible" value="false" assign="object_window" name="lid_close" />
				</event>-->
				<object name="lid_close" cursor="hand">
					<event type="clicked">
						<requirement type="session" id="M7_NAIL_USED" value="false" />
						<requirement type="holding_item" id="NAIL" warning="ALAN_TRINKET_BOX" />
						
						<property type="frame" value="activate" stop="false" assign="object_window" name="nail" />
						
						
					</event>
				</object> 
				<object name="nail" >
					<event type="frame" value="done">
						
						<property type="visible" value="true" assign="active_screen" name="Box_open" />
						<property type="visible" value="false" assign="active_screen" name="Box_close" />
						
						<property type="visible" value="true" assign="active_screen" name="nail" />
						
						<property type="visible" value="true" assign="object_window" name="lid_open" />
						<property type="visible" value="false" assign="object_window" name="lid_close" />
						
						<item remove="true" id="NAIL" />
						<session id="M7_NAIL_USED"/>
					</event>
					<event type="frame" value="nail_open">
						<sound src="Audio/SFX/PRISON/alans_office_box_open.mp3" />
					</event>
				</object>
				<object name="audio_cassette" cursor="hand">
					<event type="clicked">
						<requirement type="session" id="M7_NAIL_USED" value="true" />
						<requirement type="session" id="M7_GOT_AUDIO_TAPE_15" value="false" />
						<poi value="off" target="active_screen" object="box" align="right" type="single" />	
						<property type="visible" value="false" assign="active_screen" name="box" />
						<session id="M7_GOT_AUDIO_TAPE_15"/>
						<unlockAudioTape id="15"/>
						<closeWindow/>
						<show_book tab="3"/>
						<sound src="Audio/SFX/GAME/tape_collected.mp3" />	
					</event> 
				</object>
				
			</window>
		</event> 					
	</object>
	
	<object name="area1" id="AREA1" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="ALANS_OFFICE_AREA1"/>
		</event>		
	</object>
	<object name="area2" id="AREA2" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="ALANS_OFFICE_AREA2"/>
		</event>		
	</object>
	<object name="area3" id="AREA3" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="ALANS_OFFICE_AREA3"/>
		</event>		
	</object>
	
	
	
</screen>
	