tile_get_ids_at_depth

Returns an array containing the unique ID values for all tiles at a given depth.

Syntax:

tile_get_ids_at_depth(depth);


Argument Description
depth The depth of the tile layer to get the IDs of.


Returns: Array


Description

You can use this function to get the unique tile "id" for all tiles placed at a given depth. The function will return a 1D array, with each entry being the ID value for a single tile.


Example:

var tiles = tile_get_ids_at_depth(1000);
for (var i = 0; i < array_length_1d(tiles); i++;)
   {
   tile_set_alpha(tiles[i], 0.5);
   }

The above code will get the total number of tiles on the layer at depth 1000, then loop through them one at a time and set their alpha to 0.5.


Back: Background Tiles
Next: tile_get_background
© Copyright YoYo Games Ltd. 2018 All Rights Reserved