tile_get_ids

Returns an array containing the unique ID values for all tiles in a room.

Syntax:

tile_get_ids();


Returns: Array


Description

You can use this function to get the unique tile "id" for all tiles in a room, regardless of their 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();
for (var i = 0; i < array_length_1d(tiles); i++;)
   {
   tile_set_alpha(tiles[i], 0.5);
   }

The above code will get the ID of all tiles in a room and populate the array "tiles" with them, before looping through the array and setting the alpha of each tile to a new value.


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