
.namespace s13_c01_Hotspot

function OnActivate()
	
		if self.Name == "Hotspot_wrong2" then
			
			if translaind == 0 then
				clicwrong=clicwrong+1
				if clicwrong ~= 3 then
					SequencePlayer.Enabled = true
					SequencePlayer.PlayRandomSequence({"GP_1309","GP_1310","GP_1311"},nil,nil)
				end
			else
				translaind=0
			end
		end
		
		if clicwrong==3 then
			clicwrong=0
			PlaySoundEffect("int_closeupfail")
			SequencePlayer.Enabled = true
			SequencePlayer.PlaySequence("GP_1008",nil,nil)
		end
	
		if self.Name == "Hotspot_right2" then
			if translaind == 0 then
				trajet_4.Play(self)
				 PlaySoundEffect("int_mapnext")
			else
				translaind=0
			end
		end
		
		
		if self.Name == "indice_hotspot_1" then
			if translaind==0 then
				translaind=1
			elseif translaind==1 then
				translaind=0
			end
		end
	
end

function Itsawin()
	-- OPLog.Log("Win")
	InventoryManager.RemoveFromInventory("InventoryIndicePort3")
	PlaySoundEffect("int_closeupwin")
	s13_c01.Enabled = false
	NavigationManager.SwitchTo(nil,"s14_SearchSite")
end

function OnAnimationEnd ()
if UserData.IsEqual("s14_discovered",false) then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1306",self,nil)
		rond4.Enabled= true
		SpriteFader.Fade(rond4,true,1)
		end
	end

function OnSequenceEnd(dialogue)
	if dialogue == "GP_1306" then
	Itsawin()
	end
end

function OnEnable()
	AreaHotspot.OnEnable()
	clicwrong=0
end

function GetSpecificCursor()
	if self.Name == "indice_hotspot_1" then
		return CURSOR_AREA_HOTSPOT
	end
	return 0
end

function PrivateCanClickOn()
	return true
end

