tile_get_alpha(index);
Argument | Description |
---|---|
index | The index of the tile to check. |
Returns: Real
This function returns the current alpha value for the given
tile, alpha is the "transparency" of the image and is measured from
0 to 1, where 0 is completely transparent and 1 is completely
opaque.
var tile;
tile = tile_layer_find(-1000, mouse_x, mouse_y);
alpha = tile_get_alpha(tile);
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 store the alpha value in the variable "alpha".