function OnWarpEnter()
	----------------------------------------------------
	if not SAVE_02 then
		-- SAVE
		SAVE_02 = true
		SaveGame("2.xml")
	end
	-----------------------------------------------------
	PlaySound("Sounds/SFX/A_Wind2.ogg",-1)
	SetMarker("Memphis\\Warp_0026.wp",0,0)
	AnimationSetToEnd("d1s1",false)
	AnimationSetToEnd("d2s1",false)
	AnimationSetToEnd("d5s1",false)
	AnimationSetToEnd("d6s1",false)
	AnimationSetToEnd("o3s1",false)
	AnimationSetToEnd("o4s1",false)

	if not O_rope_me_024 then
		PutObject("fis1")
		SetMarker("fis1",2,0)
	end
	
	if FinishCH6_me and not ReMusic_me then
		PlayMusic("Sounds/Musiques/M_Quete2.ogg")
		ReMusic_me=true
	end
	GodessTalking_me=false
	GodessAnimStart_me=false
	
	if FinishCH5_as then
		StartAnimationPart("nus1",0,30,-1,true)
		SetMarker("nus1",4,0)
	end
end

function OnWarpLeave()
end

function OnDialogFinished(dialogName)
	if dialogName=="NUBI1041"  or dialogName=="NUBI1073" or dialogName=="MAIA1042" or dialogName=="NUBI1098" or dialogName=="NUBI1100" then
		SetMarker("nus1",4,0)
		StartAnimationPart("nus1",100,120,-1,true)
	end
	if dialogName=="MAIA1034" or dialogName=="MAIA1036" or dialogName=="MAIA1038" or dialogName=="MAIA1040" or dialogName=="MAIA1074" or dialogName=="MAIA1072" or dialogName=="MAIA1097" or dialogName=="MAIA1099" or dialogName=="" then
		StartAnimationPart("nus1",125,149,-1,true)
	elseif dialogName=="MAIA1042" then
		
	else
		StartAnimationPart("nus1",100,120,-1,true)
	end
	if dialogName=="NUBI1041" or dialogName=="NUBI1098"  then
		GodessTalking_me=true
	end
	if dialogName=="NUBI1039" and  GodessTalking_me then
		SetMarker("nus1",4,0)
	end
end

function OnAnimationFinished(objectName)
	if objectName=="nus1" then
		GodessAnimStart_me=false
		GodessTalking_me=true
		StartAnimationPart("nus1",100,120,-1,true)
		if not FinishCH6_me and not MaiaIntroduced_me then
			MaiaIntroduced_me=true
			DrawText("MAIA1034","MAIA1034.ogg")
			DrawText("NUBI1035","NUBI1035.ogg")
			DrawText("MAIA1036","MAIA1036.ogg")
			DrawText("NUBI1037","NUBI1037.ogg")
			DrawText("MAIA1038","MAIA1038.ogg")
			DrawText("NUBI1039","NUBI1039.ogg")
			DrawText("MAIA1040","MAIA1040.ogg")
			DrawText("NUBI1041","NUBI1041.ogg")
		elseif MaiaIntroduced_me and not FinishCH6_me  then
			AskSeparation()
		else
			DrawText("MAIA1097","MAIA1097.ogg")
			DrawText("NUBI1098","NUBI1098.ogg")
		end
	end
end

function AskSeparation()
	if not FinishCH6_me then
		PushAnswer("MAIA1074")
	end
	PushAnswer("MAIA1072")
	PushAnswer("MAIA1042")
end

function OnAnswered(textId)
	SetMarker("nus1",-1,0)
	if textId=="MAIA1074" then
		DrawText("MAIA1074","MAIA1074.ogg")
		DrawText("NUBI1039","NUBI1039.ogg")
	end
	if textId=="MAIA1072" then
		if not FinishCH6_me then
			DrawText("MAIA1072","MAIA1072.ogg")
			DrawText("NUBI1073","NUBI1073.ogg")
		else
			DrawText("MAIA1097","MAIA1097.ogg")
			DrawText("NUBI1098","NUBI1098.ogg")
		end
	end
	if textId=="MAIA1042" then
		DrawText("MAIA1042","MAIA1042.ogg")
	end
end

function OnMovieFinished(id)
	ChangeWarp("3D\\Isis\\Warp_0002.wp")
end

function OnWarpObjectHit(objectName)
	if objectName == "fis1" then
		if not O_rope_me_024 then
			SetMarker(objectName,-1,0)
			AddToBag("Corde")	
			RemoveObject(objectName)
			O_rope_me_024=true
			if O_metal_me_018 then
				RemoveFromInventary("Morceau_cuivre")
				RemoveFromInventary("Corde")
				AddToBag("J_Grappin")	
				O_Grappin_me_017=true
			end
		end
------------------------------------------------------------
	elseif objectName == "nus1" then
		LookAt(106,020)
		if Selected("Coupe_bronze") and not FinishCH6_me and not GodessAnimStart_me then 
			RemoveFromBag()
			FinishCH6_me=true   
			PlayMovie("Videos/GC_C10_Montage.ogv", "Videos/cine10.ogg") -------------------------------HERE STARTS VIDEO AND GOES TO ISIS!!!
		elseif not GodessTalking_me and not GodessAnimStart_me then
			GodessAnimStart_me=true
			StartAnimationPart("nus1",30,100,1,true)
			
			SetMarker("nus1",-1,0)

		elseif FinishCH6_me and not RetBronzeCup_me and not GodessAnimStart_me then
			SetMarker("nus1",-1,0)
			DrawText("MAIA1099","MAIA1099.ogg")
			DrawText("NUBI1100","NUBI1100.ogg")
			AddToBag("Coupe_bronze")
			RetBronzeCup_me=true
		elseif not GodessAnimStart_me then
			AskSeparation()
		end

------------------------------------------------------------
	elseif objectName == "n1s1" then

------------------------------------------------------------
	elseif objectName == "n2s1" then

------------------------------------------------------------
	elseif objectName == "nis1" then

------------------------------------------------------------
	elseif objectName == "p1s1" then

------------------------------------------------------------
	elseif objectName == "p1s2" then

------------------------------------------------------------
	elseif objectName == "p2s1" then

------------------------------------------------------------
	elseif objectName == "wos1" then

------------------------------------------------------------
	elseif objectName == "d3s1" then

------------------------------------------------------------
	elseif objectName == "d4s1" then

------------------------------------------------------------
	elseif objectName == "d5s1" then

------------------------------------------------------------
	elseif objectName == "d6s1" then

------------------------------------------------------------
	elseif objectName == "d7s1" then

------------------------------------------------------------
	elseif objectName == "was1" then
	
	elseif objectName=="3D\\Memphis\\Warp_0026.wp"  then 
		ChangeWarp(objectName)
	end
end
