tile_get_id(index);
Argument | Description |
---|---|
index | The index of the tile to check. |
Returns: Real
You can use this function to get the unique tile "id" which can
then be used in other functions like tile_get_xscale,
tile_set_alpha(), etc... The "index" argument that the
function takes is a real number from 0 up to the number of tiles in
the room (which you can find using the tile_get_count() function) and
the function will return the corresponding tile id or -1 if no tile
with the given index exists.
var num = tile_get_count();
for (var i = 0; i < num; i++;)
{
tile_set_depth(tile_get_id(i), -1000);
}
The above code will get the total number of tiles in a room, then loop through them one at a time and set their depth to -1000.