<screen src="swfs/screens/Outside/Lighthouse_inside.swf">
	<warning id="LOCATION_OUTSIDE_LIGHTHOUSE_INSIDE"/>
	
	<music src="Audio/Music/OUTSIDE/CEMETERY.mp3" fadeIn="10000" channel="MUSIC" loop="true"/>
	<music src="Audio/Ambient/OUTSIDE/LIGHTHOUSE_INSIDE.mp3" channel="AMBIENT" fadeIn="5000" loop="true"/>

	<!--<property type="visible" value="false" assign="object_window" name="Light" />-->
	<state>
		<requirement type="session" id="M4_LIGHTHOUSE_POWERED" value="true" />
		<property type="visible" value="false" assign="object_window" name="puzzle" />
		<property type="frame" value="done" stop="true" assign="active_screen" name="Light" />
		<property type="frame" value="solved" stop="true" assign="active_screen" name="thomas" />
		
	</state>
	
	<object name="puzzle" id="PUZZLE">
		<state>
			<requirement type="session" id="SOLVED_LIGHTHOUSE_INSIDE" value="true" />	
			<requirement type="session" id="M4_LIGHTHOUSE_POWERED" value="false" />
			<object name="puzzle" id="PUZZLE" cursor="puzzle"/>
		</state>
		<event type="clicked">
			<requirement type="session" id="SOLVED_LIGHTHOUSE_INSIDE" value="true" />	
			<requirement type="session" id="M4_LIGHTHOUSE_POWERED" value="false" />	
			<minigame src="swfs/minigames/Circuit.swf">
				<prize>
					<session id="M4_LIGHTHOUSE_POWERED"/>
					<goal id="TASK_4_4" remove="true" />
					<goal id="TASK_4_5" priority="4" />
					
					<portal target="Outside/LIGHTHOUSE_INSIDE"/>
					
				</prize>
				<leave>
					<portal target="Outside/LIGHTHOUSE_INSIDE"/>			
				</leave>
			</minigame>
			<requirement type="session" id="M4_BATTERY_INSERTED" value="true" />
			<error id="MG_CURCUIT_INSTRUCTION_0" />
		</event> 				
	</object>
	
	<object name="nav_outside" id="NAV_OUTSIDE" cursor="south" tooltip="LOCATION_OUTSIDE_LIGHTHOUSE_TO">
		<event type="clicked">
			<portal target="Outside/LIGHTHOUSE"/>
		</event> 				
	</object>
	
	<state>
		<requirement type="session" id="M4_THOMAS_DIALOGUE_2_VIEWED" value="true" />
		<requirement type="session" id="SOLVED_LIGHTHOUSE_INSIDE" value="false" />
		<poi value="on" target="active_screen" object="thomas" align="origin" />
	</state>
	
	
	<object name="thomas" id="THOMAS" cursor="hand">
		<event type="clicked">
			<requirement type="session" id="SOLVED_LIGHTHOUSE_INSIDE" value="false" />
			<speech>
				<text src="images/characters/thomas.png" speaker_name="THOMAS" string="M4_THOMAS_LIGHTHOUSE_1"  audio="Audio/Speech/Outside/Lighthouse/4_13_3.mp3"/>
				<finish>		
					<session id="M4_THOMAS_DIALOGUE_2_VIEWED"/>
					<!--<cinematic id="">-->			
					<portal target="HO_SCREEN/HO_LIGHTHOUSE_INSIDE" hidden_screen="true" />
					<!--</cinematic>-->
				</finish>
			</speech>
		</event>
		<event type="clicked">
			<requirement type="session" id="SOLVED_LIGHTHOUSE_INSIDE" value="true" />	
			<requirement type="session" id="M4_LIGHTHOUSE_POWERED" value="false" />
			<speech>
			<text src="images/characters/thomas.png" speaker_name="THOMAS" string="M4_THOMAS_LIGHTHOUSE_2"  audio="Audio/Speech/Outside/Lighthouse/4_13_4.mp3"/>
			<finish>		
					
			</finish>
		</speech>
		</event>
	
		<event type="clicked">
			<requirement type="session" id="M4_THOMAS_DIALOGUE_2_VIEWED" value="true" />
			<requirement type="session" id="M4_LIGHTHOUSE_POWERED" value="true" />
			<requirement type="session" id="M4_THOMAS_DIALOGUE_4_VIEWED" value="true" />
			<speech>
				<text src="images/characters/thomas.png" speaker_name="THOMAS" string="M4_THOMAS_LIGHTHOUSE_4"  audio="Audio/Speech/Outside/Lighthouse/4_13_6.mp3"/>
				<finish>		
								
				</finish>
			</speech>	
		</event>
	</object>
	
<!--	<state>
		<requirement type="session" id="M4_THOMAS_DIALOGUE_2_VIEWED" value="false" />
		<cinematic id="THOMAS_DIALOGUE_2">
			
			<portal target="HO_SCREEN/HO_LIGHTHOUSE_INSIDE" hidden_screen="true" />
		</cinematic>
	</state>-->
	
	<state>
		<requirement type="session" id="M4_THOMAS_DIALOGUE_3_VIEWED" value="false" />
		<requirement type="session" id="SOLVED_LIGHTHOUSE_INSIDE" value="true" />
		<speech>
			<text src="images/characters/thomas.png" speaker_name="THOMAS" string="M4_THOMAS_LIGHTHOUSE_2"  audio="Audio/Speech/Outside/Lighthouse/4_13_4.mp3"/>
			<finish>		
				<session id="M4_THOMAS_DIALOGUE_3_VIEWED"/>
				<cinematic id="THOMAS_DIALOGUE_3"/>				
			</finish>
		</speech>
		
	</state>
	
	<state>
		<requirement type="session" id="M4_THOMAS_DIALOGUE_3_VIEWED" value="true" />
		<requirement type="session" id="M4_LIGHTHOUSE_POWERED" value="true" />
		<requirement type="session" id="M4_THOMAS_DIALOGUE_4_VIEWED" value="false" />
		<property type="frame" value="activate" stop="false" assign="object_window" name="Light" />
		<delay time="3700" force="true"/>
		<sound src="Audio/SFX/PUZZLES/powering_up_lighthouse.mp3" />
		<delay time="2100" force="true"/>
		
		<speech>
			<text src="images/characters/thomas.png" speaker_name="THOMAS" string="M4_THOMAS_LIGHTHOUSE_3"  audio="Audio/Speech/Outside/Lighthouse/4_13_5.mp3"/>
			<finish>		
				<session id="M4_THOMAS_DIALOGUE_4_VIEWED"/>					
			</finish>
		</speech>			
	</state>
	
	<state>
		<requirement type="session" id="M4_GOT_DIRTY_JACKET" value="true" />
		<property type="visible" value="false" assign="object_window" name="thomas" />
	</state>
	
	<property type="visible" value="false" assign="object_window" name="area1" />
	
	<state>
		<requirement type="session" id="M4_LIGHTHOUSE_POWERED" value="true" />
		<property type="visible" value="true" assign="object_window" name="area1" />
	</state>
	<object name="area1" id="AREA1" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="LIGHTHOUSE_INSIDE_AREA1"/>
		</event>		
	</object>
</screen>