I am really going around in circles with this. Would someone be kind enough to give me some pseudo-code about how this might look?
I have a main scene with two TileMapLayers called "HiddenFloorLayer" and "RevealedFloorLayer".
HiddenFloorLayer has the complete level layout, but is hidden.
RevealedFloorLayer has visible but empty.
I have a "Hero" who projects a raycast in front of him and sends the coords to the _update_tile function in RevealedFloorLayer.
In RevealedFloorLayer, I have the functions:
_update_tile(coords)
_use_tile_data_runtime_update(coords: Vector2i)
_tile_data_runtime_update(coords: Vector2i, tile_data: TileData)
I use the _update_tile() function to sort whether the tile needs to be updated and pulls the tiledata from it. So far, so good. I can output the data to the terminal, so I know it's working.
However, from there I don't understand how to use the other functions to copy the tiledata to the RevealedFloorLayer... All the examples I've seen online, for example here: Can’t get the _tile_data_runtime_update() function to work never seem to pass any data to the functions so I can't figure out how to do it?
Sorry if I'm being thick, but I feel like I'm this close....