|index||The index of the tile to set.|
|visible||The visibility of the tile. true=visible, false=invisible.|
Like instances, tiles can be flagged as visible or invisible.
This function can change that flag, and by setting it to
true you make the tile visible, or by setting it to
false you can set it to invisible. This is not permanent
and if the player leaves the room and returns to it again, the tile
will be visible (if it was placed in the room editor and the room
is not persistent).
tile = tile_layer_find(-1000, mouse_x, mouse_y);
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.