tile_set_blend

Sets a tile's blending.

Syntax:

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


Description

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


Example:

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


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