It’s not possible, you cannot have a script for each tile. This is a quote from reduz explaining the limitation of TileMap in favor of performance:
more stuff could be eventually added, but in truth the idea is that you should combine the tilemap with instanced objects, not use one or the other.
Tilemap is designed to draw large amount of quads quickly, so adding more flexibility would beat the purpose. What is the problem of combining both?
As he explains, if you want more advanced behaviour, you can use other nodes for that task.
Well, thanks for that. This is actually, what I’m currently doing. But I was curious, if there is a more simple or elegant way.
PixelWizzard | 2016-03-06 19:24
I am sorry to re-open this thread, even if I found it useful to understand the limitations of TileMap node.
However, being new to Godot, I am running into the same problem as PixelWizzard and I can’t find a proper way to solve this problem.
For now I am using scenes as tiles (with script attached to it), but I don’t think it is the way to go when there are hundreds/thousands of tiles involved.
Does anyone has an idea on the best way to do it ?
Many thanks in advance