• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Screen colour overlay (for explosion)

R

RATInteractive

Guest
How can i make the screen overlay with an orange tint for a few seconds to make an explosion impact look bigger.
 
R

RealityShifter

Guest
Probably a more efficient way to do it but this what came to mind.

Create event, declare "overlay_alarm = 0;"

STEP event:
Code:
if keyboard_check_pressed(vk_shift){
    overlay_alarm = 3*room_speed;
}
DRAW GUI event.
Code:
if overlay_alarm > 0{
    overlay_alarm -= 1;
    draw_set_alpha((.5/(3*room_speed))*overlay_alarm);
    draw_set_color(c_orange);
    draw_rectangle(0,0,room_width,room_height,0);
    draw_set_alpha(1);
}
In this example the orange tint fades out over 3 seconds. but you can change the alpha to whatever you want of course.
 

Schwee

Member
Like to display orange on the whole screen?

Code:
draw_set_colour(c_orange);
draw_set_alpha(.5);
draw_rectangle(view_xview[0], view_yview[0], view_xview[0]+viewWidth, view_xview[0]+viewHeight);
draw_set_alpha(1);

There's probably actual variables to call for viewWidth and viewHeight but I am blanking.
 
Top