S
Sake_v2
Guest
I used to have a working colored lightning system in Game Maker 8.0 (I think it was that one) some time ago. Then, on the Studio version, the exact same code simply wouldn't work, and after a lot of trying around, I was able to get SOMETHING, but not as before. I was going to worry about this after the game was finished, but whatever, here is a image.
The image on the RIGHT is how it was before, there was no noticeable harsh border on the light, I was able to create a smooth blue lightning out of that with no border. Also the green light. The image on the left, is how it is now. It is KINDA blue and green, but I can't get the smooth lightning effect working again, always with that border. (Yes, I tried using bm_subtract and drawing a circle_colour from green to black and blue to black, that is the effect its creating).
The code before on the obj_light was this:
Create event
Step event
Draw event
Then on the blue, green light etc:
End step event:
Unfortunately on Studio this stopped working, even using now the draw_circle_coloUr and everything. I'm pretty sure because the draw_set_color(make_color_rgb(100,100,100)); to decide how dark it is doesn't work anymore, instead I have to draw the rectangle with draw_set_color(c_black) and then draw_set_alpha(0.8) or something to determine how dark. Any help on creating the effect on the RIGHT again, would be appreciated.
The image on the RIGHT is how it was before, there was no noticeable harsh border on the light, I was able to create a smooth blue lightning out of that with no border. Also the green light. The image on the left, is how it is now. It is KINDA blue and green, but I can't get the smooth lightning effect working again, always with that border. (Yes, I tried using bm_subtract and drawing a circle_colour from green to black and blue to black, that is the effect its creating).
The code before on the obj_light was this:
Create event
Code:
globalvar light;
light = surface_create(view_wview,view_hview);
Code:
surface_set_target(light);
draw_set_color(make_color_rgb(100,100,100));
draw_rectangle(view_xview,view_yview,view_wview,view_hview,false);
surface_reset_target();
Code:
draw_set_blend_mode(bm_subtract);
draw_surface(light,view_xview,view_yview);
draw_set_blend_mode(bm_normal);
End step event:
Code:
size = 300;
draw_set_blend_mode(bm_subtract);
surface_set_target(light);
draw_ellipse_color(x-size/2-view_xview,y-size/2-view_yview,x+size/2-view_xview,y+size/2-view_yview,c_blue,c_black,false);
surface_reset_target();
draw_set_blend_mode(bm_normal);