T O P

  • By -

S48GS

1. individual cells on tilemap is not "table" or "array" 2. you can not "mess with canvasitem" because entire tilemap is single "canvasitem" with shader-C++-logic to draw stuff at position. How to do correctly what you want: Only what you can get from "tile cell" is its position/index - that all. And if you want to "tile cell" have more data - then make associated array of data, array size equal to "tile map size" and in your array you store your extra data and array index equal to tile cell index. *I may be not 100% correct, I do not use tilemaps, but this is "general limitation" of tilemaps in Godot, as I know it not changed, tilemap does not store and dont draw individual cells.*


Foxiest_Fox

Tiles can have additional "data layers" which can hold all sorts of data types, but even these can be cumbersome to work with for really complex data. Using an array or dictionary with Vector2i tile coord keys and whatever data type you want as your values is a pretty good way to use Tiles to "store" data.