but when use Tile.getBuildingName(tileX, tileY) is always return a nil value
is a bug

Moderators: Scenario Moderators, Plugin Moderators
Code: Select all Reset
function script:click(x,y,level) Debug.toast(Tile.getBuildingName(x,y)) end
Thanks very much, I'll try again laterian` wrote: ↑13 Nov 2020, 12:45yeah, it's still available. You only need to do something to get the tileX and tileY values. The simpliest things are you can use script:click(x,y,level) and attach the script into building draft. so the tileX and tileY values can be set when the user click the building.
anyways, you can ask about lua in Lua Chatbox post.Code: Select all Reset
function script:click(x,y,level) Debug.toast(Tile.getBuildingName(x,y)) endLua editor