G
graviax
Guest
So I used an old code I "made" to make a lightning effect using surfaces, but it doesn't work anymore...
It does not crash, but it just doesn't want to draw anything on my surface
here's the code
obj_lightning's create event :
obj_lightning's step event :
obj_lightning's draw event :
obj_light's end_step event :
Thanks for your responses.
Sorry in advance for my grammar mistakes.
It does not crash, but it just doesn't want to draw anything on my surface
here's the code
obj_lightning's create event :
Code:
depth = -100;
global.light = surface_create(view_wview,view_hview);
Code:
if(surface_exists(global.light)== 0)
{
global.light = surface_create(view_wview,view_hview);
}
surface_set_target(global.light);
draw_set_color(make_color_rgb(230,230,230));
draw_rectangle(0,0,view_wview,view_hview,false);
surface_reset_target();
Code:
draw_set_blend_mode(bm_subtract);
draw_surface(global.light,view_xview,view_yview);
draw_set_blend_mode(bm_normal);
obj_light's end_step event :
Code:
draw_set_blend_mode(bm_subtract);
surface_set_target(global.light);
draw_set_circle_precision(4);
draw_circle(x,y,size/2,color1,color2,false);
surface_reset_target();
draw_set_blend_mode(bm_normal);
Sorry in advance for my grammar mistakes.