Godot 4.3
I’m trying to set up a system to procedurally generate a tilemap. I’ve got a basic version of that, now I’m trying to add in terrain/autotiling to it, but I’m not sure how. I found set_cells_terrain_connect and set_cells_terrain_path, but I haven’t figured out how you are meant to use them, exactly. My code without autotiling looks like this:
for x in map_width:
for y in map_height:
match grid[x][y]:
empty_id:
pass
floor_id:
#print("setting cell to floor")
#await get_tree().create_timer(0.3).timeout
floor_tilemap.set_cell(Vector2i(x, y), floor_id, Vector2i(0, 0), 0)
floor_tilemap.set_cells_terrain_connect([Vector2i(x, y)], 0, 0)
wall_id:
pass
Are you meant to use both set_cell and set_cells_terrain_connect together like this, or am I supposed to just use set_cells_terrain_connect on its own? Also, what is the difference between set_cells_terrain_path and set_cells_terrain_connect?
Thank you for the help!