I have confused myself (very much) with the process on identifying the cells of a tiles map inside of an area 2d. I would like to change the tile when there is contact with the object and use a surrounding area 2d to tell the cells to change to the next tile.
The best way i have seen it summed up is follows, but i am struggling on how to do this within my area 2d:
"
n 4.0, you need 3 identifiers to check a given tile:
The first one is the source ID, it corresponds to the TileSet source ID you have your tile in. This source ID is visible in the list of atlases on the left of the TileSet editor.
The second ID is the atlas coords, which correspond to the coordinates of a tile in the atlas.
The last one is the alternative ID, which only matters if you created alternative to a given tile. Otherwise, it should be 0.
To get those IDs from a tile on a TileMap, you can retrieve them using TileMap.get_cell_source_id(...), TileMap.get_cell_atlas_coords(...) and TileMap.get_cell_alternative_tile(...), and thus compare them to the expected value. Those ID are -1 (or Vector2i(-1,-1)) if the cell is empty.
"
i think i should be able to do this with my area 2d with the resources i have. However..... here i am again. Kinda need someone to strap the training wheels on here.