Well thanks for the kind words…
Slightly related to this - I’m trying to tint a tile to highlight where the player’s chosen item will seed/water/etc… Would you have any advice on best practise for this?
Essentially I just what to highlight the tile that the accompanying object’s action will be associated with in its touch handler.
Currently I have a layer assigned specifically to this comprised of white tiles in Tiled. I fade this layer on loading the map and then wihtin the touch listener of said object I make a call to a method that calls fadeTile() on the highlighted tile from the touch listener and tries to raise its individual opacity.
Unfortunately it doesn’t appear to be working… If a layer is faded to 0 will I be able to increase the opacity of an individual tile?
In the touch handler I have this:
[lua]
local loc = self.m_pMap:convert( “screenPosToLoc”, event.x, event.y)
self.m_pMap:tintTile(loc.x, loc.y)
[/lua]
Which makes call to this method:
[lua]
function Game_Map:tintTile(x,y)
print("TINT TILE: “…x…” / "…y)
mte.fadeTile(x,y,6,0.5,10,easing.inOutQuad)
– mte.tintTile(x,y,3,{255,0,0},0,easing.inOutQuad)
end
[/lua]
However I had previously faded this layer???