tile_get_alpha

Returns the alpha value of a given tile.

Syntax:

tile_get_alpha(index);


Argument Description
index The index of the tile to check.


Returns: Real


Description

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.


Example:

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".


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