goalFindKey.mSteps = 
{
	{ action = "click", object = objectPorchRockHitarea },
	{ action = "click", object = objectPorchKey },
}
goalFindKey.dispatchedKey = false
-- ----------------------------------------------------------------------------
function goalFindKey:onStarted()
    
    layoutPorchNote.countingStarted = true
    
end
-- ----------------------------------------------------------------------------
-- TODO: This entire function is obsolete when onAnimationFinish is called properly:
function goalFindKey:onClickObject(layout, object, props, x, y)

	if (object == objectPorchKey) then
		self:achieved()
	end
	
end
-- ----------------------------------------------------------------------------
function goalFindKey:onAnimationFinish(animationName)
	
	if (string.sub(animationName, 1, 21) == "animObjectToInventory") then
		
		-- HELP Inventory
		queueHelpDialog(4, -1, -1)
		queueHelpArrow(6, 4, 50, 200)
		
		self:achieved()
	end
	
end
-- ----------------------------------------------------------------------------
function goalFindKey:dispatchKey()

	if (not self.dispatchedKey) then
		objectPorchKey:ss(kHidden)
		objectPorchRockHitarea:ss(kActive)
		objectPorchRockUnlit:ss(kActive)
		objectPorchRockInsect:ss(kIdle)
		layoutPorch:showRockHighlight()
	    
		-- HELP shopping list
		local n =
		{
			hintIdx = 3,
			x = 18,
			y = 315,
			eraseFunction = function()
				return not objectPorchKey:isActive() and not objectPorchKey:isHidden()
			end
		}
		queueHelpDialogExt(n)
		queueHelpArrow(9, 3, 210, 670)
		
		self.dispatchedKey = true
	end
	
end