I’m creating an in-game level editor and want to give the player the ability to draw levels using a tilemap, that automatically connects. I have already set autotiling and I have already found a function set_cells_terrain_connect(), but I have no idea how to use it for my purposes, because for placing tiles I use function set_cell(), that requires tiles ID (may be I should use another function, I really have no idea now(…)
So… Sorry for the misunderstanding, but where then can I give this function a position to place the tile? Using set_cell() allows me to set the coordinates for the new tile in the second argument, which in my code is get_global_mouse_position(), but I don’t see such an argument in the set_cells_terrain_connect() function.
Thank you very much! I understood my problem. I thought the second parameter should be an array of tile coordinates that I want to use from my tile map. if someone in the future will be interested, it is just:
var cell_position : Array[Vector2i] = [Vector2i(0,0)]