
.namespace Map_parent

function OnSequenceEnd (keyword)
	if keyword == "GP_503" then
	 trajet_1.Play(self)
	 PlaySoundEffect("int_mapnext")
     
	 
  end
  if keyword == "GP_804" then
	 trajet_2.Play(self)
	 PlaySoundEffect("int_mapnext")
	 
  end
  
end

function OnAnimationEnd ()
	if UserData.IsEqual("s08_discovered",false) then
		InventoryManager.RemoveFromInventory("InventoryMap")
		Map_area.Enabled = true
		rond.Enabled= true
		SpriteFader.Fade(rond,true,1)
	end
	if UserData.IsEqual("s08_discovered",true) then
		Map_2_area.Enabled = true
		rond2.Enabled= true
		SpriteFader.Fade(rond2,true,1)
	end
end

function OnEnable()
	if UserData.IsEqual("s08_discovered",false) then
	Map_area.Enabled = false
	Map_2_area.Enabled = false
	SequencePlayer.Enabled = true
	rond.Enabled= false
	SequencePlayer.PlaySequence("GP_503",Map_parent,nil, "transition")
	
	end
	if UserData.IsEqual("s08_discovered",true) then
	rond.Enabled= false
	Background.SetFrame(1)
	Map_2_area.Enabled = false
	Map_area.Enabled = false
	rond2.Enabled= false
	InventoryManager.RemoveFromInventory("InventoryEchelles08")
	SequencePlayer.Enabled = true
	SequencePlayer.PlaySequence("GP_804",Map_parent,nil, "transition")
	end
end


