Tilemap get all indexes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By patatra

Hy everyone,
Is there a way to get all the indexes that a tilemap contains to use it in GdScript?

Good day,

:bust_in_silhouette: Reply From: zephy

Hello, there is a method in TileSet called get_tiles_ids() which returns an array of all the id’s in the tileset. Inside your tilemap script you can reference the tileset by doing: var tile_ids = tile_set.get_tiles_ids(). Hope this helps!