Working with tilemaps

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

I am using a tilemap to generate a map in my project. I want to give some tiles some properties, but I don’t know how. For example, when I walk on a door tile, I want the scene to change. How do I connect the tile area or the tile itself to a script file?
Sorry to bother, thanks for help!

:bust_in_silhouette: Reply From: exuin

You can’t connect the individual tile or tile area to a script file since the tile data is stored in a tileset and the tile collision is combined into one big collision shape. You will need to use TileMap functions like world_to_map() in order to convert the coordinates of the area to the coordinates of the tile and then get the ID of the tile at those coordinates.