function OnWarpEnter()
	PlaySound("Sounds/SFX/A_Wind2.ogg",-1)
	PlayMusic("Sounds/Musiques/M_Quete2.ogg")
	if not BeenIn_me_001 then
		LookAt(182,356)
		PlayMusic("Sounds/Musiques/M_Quete2.ogg")
		BeenIn_me_001=true
		 Music_as=true 
		 BeenIn_as_001=true 
		 Imhotep_Moved_piM_010=true 
		 CURSE_END=true 
		 TuyaTalking_as_015=true 
		 BallBroken_as_002=true 
		 STICK_LIGHTED=false 
		 DjerRecognizeMaya_piT_003=true 
		 Ball_as_002=true 
		 MYSTERIUXCARTOUCHE_GIVEN=true 
		 BeenIn_025_cr=true 
		 Paser_DoorRoom_Opened_piM_004=true 
		 BeenIn_asQ_001=true 
		 O_ocre_as_005=true 
		 O_formule_Serp_as_007=true 
		 O_Document_extraction_piM_010=true 
		 BAppleCutted_as_15=true 
		 Objects_Picked_pi_053=true 
		 CartouchePieceRemoved_piT_030=true 
		 Excrements_as_004=true 
		 O_morter_as_015=true 
		 CrypteDoorOpened_piT_030=false 
		 ResetTimer_as_017=false 
		 Video_pi_053=true 
		 CartouchePieceIn_piT_030=false 
		 O_serp_dried_as=true 
		 BoatmanTalking_piT_003=true 
		 ReadyToGo_as_001=true 
		 CRYPTE_PUZZLE_SOLVED=true 
		 FIRST_DJER_SEEN=true 
		 BrickMaker_Recognize_piM_014=true 
		 O_gum_as_015=true 
		 BrickmakerTalking_piT_014=true 
		 HSpell=true 
		 Remedy_Done_as_015=true 
		 FIRST_WARP_ENTER=true 
		 VPlayed_as_017=true 
		 PaserDoorOpened_piT_018=true 
		 CartoucheIn_piT_030=true 
		 FirstBrickmakerTalk_piT_014=true 
		 Paser_Sit_pt_0008=true 
		 O_jarBroken_as_015=true 
		 O_knife_as_015=true 
		 O_tourche_piM_011=true 
		 TuyaLeft_as_015=true 
		 TimeRunning_as_15=false 
		 Door_as_016=true 
		 QUARY_DOCUMENTS_FOUND=true 
		 FirstDjerTalk_piT_003=true 
		 DjerTalking_piT_003=true 
		 TuyaTest_as_015=true 
		 SemiTest_as_015=false 
		 CRYPTE_LOCKED=false 
		 First_Entrance_piT_021=true 
		 PASER_FALL=false 
		 BallTaken_as_002=true 
		 O_papers_as_017=true 
		 DjerStandIn_piU_012=false 
		 CanOpen_as_016=true 
		 PurificationSpellOn=true 
		 Ouni_Permission=true 
		 TuyaTesting_as_015=false 
		 Door_as_004=true 
		 Intro=true 
		 Tool_DoorRoom_Opened_piM_008=true 
		 CARTOUCHEPIECEGIVEN=true 
		 Door_as_008=true 
		 BoatMTalking_as_010=true 
		 O_terebinth_as_015=true 
		 O_jar_as_015=true 
		 BoatmanFirstTalk_piT_007=true 
		 PASER_UNCONSCIOUS=true 
		 TALK_TO_PASER=true 
		 O_cartouchepiece_piT_022=true 
		 TRAVEL_TO_MEMPHIS=true 
		 CARTOUCHE_PIECE_FOUND=true 
		 O_BApple_as_015=true 
		 Door_as_012=true 
		 Ouni_docs_as_001=true 
		 TSpell=true 
	end

	SetMarker("Memphis\\Warp_0003.wp",0,0)
	StartAnimation("d2s1",-1)
	
	if  WentOf_me_3 or not GuardHipnotized_me_004 then
		StartAnimationPart("gas1",0,30,-1,true)
	else
		StartAnimationPart("gas1",130,160,-1,fasle)
	end
	StartAnimationPart("bas1",60,200,-1,true)
	SetMarker("bas1",4,0)
end

function OnWarpLeave()
end

function OnMovieFinished(id)
	if not WentOf_me_7 then
		ChangeWarp("3D\\Assouan\\Quartier\\Warp_0010.wp")	
	else
		ChangeWarp("3D\\Pi Ramses\\Temple U\\Warp_0001.wp")
	end
end

function OnDialogFinished(dialogName)
	if dialogName=="BATE0924" then
		PlayMovie("Videos/GC_C14_Montage.ogv", "Videos/cine14.ogg")	
	end
	if dialogName=="BATE1102" then
		PlayMovie("Videos/GC_C14_Montage.ogv", "Videos/cine14.ogg")
	end
end

function OnWarpObjectHit(objectName)
	if objectName == "bas1" then
		if FinishCH3_me and not WentOf_me_3 then
			WentOf_me_3=true
			DrawText("MAIA0923","MAIA0923.ogg")
			DrawText("BATE0924","BATE0924.ogg")
		elseif FinishCH6_me and not WentOf_me_7 then
			if CoupeSaleOK then
				WentOf_me_7=true
				DrawText("MAIA1101","MAIA1101.ogg")
				DrawText("BATE1102","BATE1102.ogg")
			else
				DrawText("MAIA1033","MAIA1033.ogg")
			end
		else
			DrawText("MAIA1033","MAIA1033.ogg")
		end
	
------------------------------------------------------------
	elseif objectName == "d2s1" then

	elseif objectName=="3D\\Memphis\\Warp_0003.wp" then
		ChangeWarp(objectName)
	end
	
end
