Delete tilemaps

Hi is there anyway to delete a tile when it get hits with a collision, i can’t seem to find tilemap code that does this

Use tilemap.set_tile() and use 0 as tile id to clear/remove it.

4 Likes

Thanks but I dont really understand how to use these functions, I want it to make it so if i punch a tile (wall) then it breaks, but im not sure how to do this, i dont understand the usage of indexes and x,y parameter. Can you please help me?

Update: im having a more basic understanding of the functions but im not to sure on how to get accurate x,y coordinates on the tile i want to manipulate is there any handy function or solution to do this?

Update: I realize that the x,y coordinates are cell coordinates and not normal coordinates, is there any way with code that i can get the cell coordinates on the blocks i punch

1 Like