tile_set_blend(index, colour);
Argument | Description |
---|---|
index | The index of the tile to set. |
colour | The colour to blend the tile with. |
Returns: N/A
With this function you can set a colour to be blended with the
tile. The default value for the blend colour is -1 (which
represents the constant c_white) but any colour value can
be used. This is not permanent and if the player leaves the room
and returns to it again, the tile will have it s original blend
colour (if it was placed in the room editor and the room is not
persistent).
var tile;
tile = tile_layer_find(-1000, mouse_x, mouse_y);
if tile_get_blend(tile) != -1
{
tile_set_blend(tile, c_white);
}
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 blend is anything other than the default -1. If it is it sets the tile blend to white (no blending).