
.namespace s18_HotSpot

function OnActivate()
	
	OPLog.Log("onactivate "..self.Name)
	
	if self.Name == "porte" and SampleLevel.IsEqual("s18_hache",false) then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1802",nil,nil)	
	end
	
	if self.Name == "porte" and SampleLevel.IsEqual("s18_hache",true) then
		NavigationManager.SwitchTo(nil,"s19_SearchSite")	
	end
			
end

function OnEnable()
	AreaHotspot.OnEnable()
	--self.firstclick = true
	OPLog.Log("mon onenable "..self.Name)

end

function OnDropObject()
	OPLog.Log("drop "..self.Name)
	if IsEqualVariables("CurrentObject","InventoryHache") and self.Name == "porte" then
		s18_door.SetFrame(1)
		InventoryManager.RemoveFromInventory("InventoryHache")
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1804",s18_SearchSite,nil)
		SampleLevel.Set("s18_hache",true)
		PlaySoundEffect("gmp_breakdoor")
		return true
		
	end
end
function PrivateCanClickOn()
	--if SampleLevel.IsEqual("CloseupMecaState","finished")  then
	--	return false
	--end
	
	return true
end
function GetSpecificCursor()
	if self.Name == "porte" then
		return 4
	else
		return CURSOR_AREA_HOTSPOT
	end
end


