Windows Ideas to make tiles semi-transparent in a radius around the player.

YanBG

Member
Hey all, my isometric wall tiles have depth=-y and they belong to different layers, i want to reduce their alpha while the player is behind them. From the manual i figured how to "hide" them with the mouse but it works only with a specific pixel and i need them to become automatically "solid" again after the player passes.

Code:
var tile=tile_layer_find(-mouse_y,mouse_x,mouse_y);
if tile!=-1{
    if tile_get_alpha(tile)<1{
        tile_set_alpha(tile,1);
    }else{
        tile_set_alpha(tile,.5);
    }
}
My game: http://media.indiedb.com/images/games/1/44/43236/Screenshot.6.png
 
D

Dudeidu

Guest
What I would do is draw the player on top of anything else with low image_alpha, so that when it is covered by anything you will still see him.
Seems like a simple solution for an otherwise complex problem.
 
Top