Layered sprites in Tilemaps?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gax
:warning: Old Version Published before Godot 3 was released.

I am wondering if it is possible to draw more than one sprite per tile in a Tilemap (like, say, a background behind a foreground image, where the background is tiled and changes depending on the tile being used). Obviously, this could be done by layering a tile’s sprites in a program like GIMP, then saving the image and using that as the tile’s sprite. But this makes it tedious to change the sprites, so I am wondering if there is a more convenient way to do this within Godot.

:bust_in_silhouette: Reply From: kidscancode

You can’t put more than one tile per tile, but you can layer multiple Tilemaps.

You can even script their interaction using get_tile() on the background to choose what to set_tile() on the foreground, for example.