function OnWarpEnter()
	PlaySound("Sounds/SFX/A_Wind2.ogg",-1)	
	SetMarker("Pi Ramses\\Temple U\\Warp_0018.wp",0,0)
	Djer15AnimPlaying = false
	if Khaem_on_Countryyard and not DjerTurned_piU_015  then
		StartAnimationPart("O1U1",0,80,-1,true)
		SetMarker("O1U1",4,0)
	elseif Khaem_on_Countryyard then
		SetMarker("Pi Ramses\\Temple U\\Warp_0012.wp",0,0)
		StartAnimationPart("O1U1",180,210,-1,true)	
	else	
		SetMarker("Pi Ramses\\Temple U\\Warp_0012.wp",0,0)
	end
end

function OnDialogFinished(dialogName)
	if dialogName=="MAIA1258" then
		StartAnimationPart("O1U1",101,170,1,true)
		Djer15AnimPlaying = true
	elseif dialogName=="OUVA1253" then
		StartAnimationPart("O1U1",0,80,-1,true)
	elseif dialogName=="MAIA1254" then
		StartAnimationPart("O1U1",80,100,-1,true)
	elseif dialogName=="OUVA1255" then
		StartAnimationPart("O1U1",0,80,-1,true)
	elseif dialogName=="MAIA1256" then
		StartAnimationPart("O1U1",80,100,-1,true)
	elseif dialogName=="OUVA1257" then
		StartAnimationPart("O1U1",0,80,-1,true)
	end
end

function OnAnimationFinished(objectName)
	if objectName=="O1U1" then
		StartAnimationPart("O1U1",180, 210,-1,true)
		SetMarker("Pi Ramses\\Temple U\\Warp_0012.wp",0,0)
		DjerTurned_piU_015 = true
		--Khaem_on_Countryyard = true
		Djer15AnimPlaying = false
	end
end


function OnWarpLeave()
end

function OnWarpObjectHit(objectName)
	if objectName == "O1U1" then
	    if not Djer15AnimPlaying then
		if not DjerTurned_piU_015 then
			SetMarker("O1U1",-1,0)
			StartAnimationPart("O1U1",80,100,-1,true)
			DrawText("OUVA1253","OUVA1253.ogg")
			DrawText("MAIA1254","MAIA1254.ogg")
			DrawText("OUVA1255","OUVA1255.ogg")
			DrawText("MAIA1256","MAIA1256.ogg")
			DrawText("OUVA1257","OUVA1257.ogg")
			DrawText("MAIA1258","MAIA1258.ogg")
		end
	end
------------------------------------------------------------
	elseif objectName == "D2T1" then
	end
	if objectName=="3D\\Pi Ramses\\Temple U\\Warp_0018.wp" then
		ChangeWarp(objectName)
        end
	if objectName=="3D\\Pi Ramses\\Temple U\\Warp_0012.wp" then
		ChangeWarp(objectName)
        end
end
