scale tiles in tilemap during runtime

Godot Version

4.4.1

Question

Hello! I am making a game that has a TileMapLayer that where I want to get every other tile to bump to the beat of the music. Or more exactly to a the beat of a signal I am sending out. What I am struggling with is a way to increase the size of every other tile. I’ve been looking at doing it with shaders, but I was having difficulty referencing every other tile. I’ve then been looking at just a way to do it through normal gdscript, but there doesn’t seem to be a way to programmatically reference tiles.

Any help would be appreciated!

You can assign a material to each tile by getting its TileData with TileMapLayer.get_cell_tile_data() and assigning the material to TileData.material

I don’t think there’s any other way to do what you are asking with a TileMapLayer and an atlas. You could use scenes by adding them to the TileSet in a TileSetScenesCollectionSource and do whatever you need with them.