David Richard
Member
I have been scratching my head over this little thing. Can someone help me out with this?
What I want to do
Draw an image with alpha values on a surface, a background part for example.
Create a sprite from the surface with the correct background part's alpha values.
Use that sprite for specific on the fly needs.
In a picture, here's what I want to do
I tried to clear my draw surface with black at alpha 0, the image becomes darker. I tried with fuchsia and the image becomes combined with fuchsia.
My code looks like this:
Is this at all possible in GameMaker Studio or am I dreaming? I also tried with different blending modes but I have not found anything that gives me the results I want BUT I have seen lots of effects...
What I want to do
Draw an image with alpha values on a surface, a background part for example.
Create a sprite from the surface with the correct background part's alpha values.
Use that sprite for specific on the fly needs.
In a picture, here's what I want to do
I tried to clear my draw surface with black at alpha 0, the image becomes darker. I tried with fuchsia and the image becomes combined with fuchsia.
My code looks like this:
Code:
var sfc = surface_create(my_width,my_height+1);
surface_set_target(sfc);
draw_clear_alpha(c_fuchsia,0);
draw_background_part_ext(my_back,bg_left,bg_top,my_width,my_height+1,x,x,1,1,c_white,1);
sprite_create_from_surface(sfc,x,y,my_width,my_height+1,true,false,0,0);