Antoine Farel
Member
Hi,
I got an object
This code draws a blinking green square (
And I got an objet
The above codes are simplified, but here is the end result :
The surface created is the purple zone and I create the
As you can the when the alpha of the
Thanks !
I got an object
obj_foo
with the following Draw Event:
GML:
draw_set_color(c_green);
draw_set_alpha(scr_wave(.75,1,2,0,0));
draw_rectangle(x,y,x+32,y+32,false);
draw_set_alpha(1);
scr_wave
is a script that I created that create values following a cos signal)And I got an objet
obj_surf
with the following Draw Event:
GML:
if surface_exists(surface) { //in create event : surface = noone;
surface_set_target(surface);
draw_clear_alpha(col_purpule, .97); //col_purple a a color that I defined in the create event
with (obj_foo) event_perform(ev_draw, 0);
surface_reset_target();
draw_surface(surface, x1, y1);
} else {
surface = surface_create(x2 - x1, y2 - y1);
}
obj_foo
at the four corners. Do not pay attention to the objects displayed at the top left, I just did not uncheck the visible option of these objects.As you can the when the alpha of the
obj_foo
is low, the transparency makes the background appear directly and not the purple of my surface. How can I resolve this issue?Thanks !