Problem with transparencies and surfaces

S

Sitruc

Guest
if surface_exists(surface)
{
surface = surface_create(room_width,room_height);
}
else
{
surface_set_target(surface);
draw_clear_alpha(c_gray,.5);
draw_set_blend_mode(bm_src_colour);
draw_sprite_ext(spr_fog,1,obj_TankBody.x,obj_TankBody.y,3,3,0,0,1);
draw_set_blend_mode(bm_normal);


surface_reset_target();
}

I'm trying to make a .5 alpha gray surface cover the whole room, I've circle sprite with alpha and try to draw it over the "tank body" my results so far is the whole room is a solid gray, can't figure out what i'm doing wrong,

my goal is to basicly subtract from the gray surface to make it 100% transparent.
 
Last edited by a moderator:
Top