Get the ID of a single tile in a tileset

Ahoi hoi comrades.
I make a Game where you can interact a bit with your enviroment and so i want a Tileset that destroys its single components at impact. bit with all the "layer_tilemap" functions i can just change all of the tiles in the tileset.
Is there a possibility to change single tiles in a tileset?
i dont want to make the walls objects because of performance reasons.
 

TheouAegis

Member
Once you create a tile layer in the room, the layer is divided up into tiles automatically. In a tile set, 0 us reserved for the "empty" tile. Since it is still technically a tile, you can set any tile at any coordinates in the room to 0, which will replace that tile in the room with tile 0, but not affect the tile set itself. Similarly, you can use another value besides 0 and it will replace the tile with the one you specified.
 

NightFrost

Member
Also, be sure to use the right terminology as GMS assigns very specific meanings to those words. A "tileset" is the template you create from a sprite and I recall they are pretty much immutable, you can't even designate them through code, the editor is the only place where you can do that. On the other hand a "tile map" is the room content you create in the editor, attached to a layer, and there is a number of commands you can use to alter it runtime.
 
Top