setImage and setTileAt not Working

Adding the line grassTile:setImage(2) in sample IsometricAndPlayer not working.

 if grassTile then  
  
 -- If there is a tree tile or the grass tile is an obstacle then we shall not pass  
 --if treeTile or grassTile.isObstacle then  
 -- return  
 --end  
  
 -- Get the position of the new tile  
 position = lime.utils.gridToWorldPosition( map, newGridPosition, offset )  
  
 local onTransitionComplete = function( event )  
 player.transition = nil  
 end  
  
 -- Move the player  
 grassTile:setImage(2);  
 player.transition = transition.to( player, { time = 500, x = position.x, y = position.y, onComplete = onTransitionComplete } )  
  
 -- Update the main grid position  
 gridPosition = { column = newGridPosition.column, row = newGridPosition.row }  
  
 end  
  

[import]uid: 79379 topic_id: 18943 reply_id: 318943[/import]

Is it giving an error or something else? [import]uid: 5833 topic_id: 18943 reply_id: 73285[/import]

no runtime error. only erases the tile. [import]uid: 79379 topic_id: 18943 reply_id: 73288[/import]

This should hopefully fix it:

Go into “lime-tile.lua” and find the Tile:setImage() function, towards the end of that you should find the line “self:build()”, under that just place these lines:

-- Bring the new tile into focus self:getVisual():toFront() self:getVisual().isVisible = true [import]uid: 5833 topic_id: 18943 reply_id: 73289[/import]

ok. working. [import]uid: 79379 topic_id: 18943 reply_id: 73296[/import]

Glad to hear it. [import]uid: 5833 topic_id: 18943 reply_id: 73299[/import]

new bug.
adding map:hide() and map:show() after applying a setImage cause a new bug in line 396 of lime-tilelayer.lua

 grassTile:setImage(3);  
 map:hide();  
 map:show();  

[import]uid: 79379 topic_id: 18943 reply_id: 73545[/import]

What’s the error say? [import]uid: 5833 topic_id: 18943 reply_id: 73737[/import]

…\lime-tileLayer.lua:396: attempt to index field ´?´ (a nil value)
stack traceback:
[C]: ?
…\lime-tileLayer.lua:396: in function ´hide´
…\lime-map.lua:601:
[import]uid: 79379 topic_id: 18943 reply_id: 73757[/import]

Are you able to zip up the project, or a simpler one that just demonstrates the issue, and send it to me that would be great. support@justaddli.me [import]uid: 5833 topic_id: 18943 reply_id: 73795[/import]