tile_get_visible(index);
Argument | Description |
---|---|
index | The index of the tile to check. |
Returns: Boolean
This function returns the current visibility for the given tile,
where true is visible and false is invisible.
var tile;
tile = tile_layer_find(-1000, mouse_x, mouse_y);
if !tile_get_visible(tile)
{
tile_set_visible(tile, true);
}
The above code will first get the index of a tile at the mouse position with a depth of -1000 and then use that value to check whether the tile is visible or not, and if not set the tile to visible.