Game Maker Studio: How to Create a Flickering Light Glow.

Channel:
Subscribers:
268
Published on ● Video Link: https://www.youtube.com/watch?v=k2t2Q4iAI5c



Duration: 13:04
329 views
0


Visit my Search Arena site: https://searcharena.wordpress.com/

GMX File: https://bit.ly/2YjE4TL

(Note): Was not said in video, Be sure the obj_lighting image is in the room, or there will be a crash message. Obj_lighting needs to be in the room, so the glow effect will appear. In the upload the obj_lighting image is in the room and glow will appear.

obj_lighting, Depth -800, Be sure obj_lighting is set to a high number of Depth, over you're other images.

Events:

Create

Actions:

globalvar light;
light = surface_create(view_wview,view_hview)

Events:

Step

Actions:

surface_set_target(light);
draw_set_color(c_white);
draw_rectangle(0,0,view_wview,view_hview,false)
surface_reset_target();

Events:

Draw

Actions:

draw_set_blend_mode(bm_subtract);
draw_surface(light,view_xview,view_yview);
draw_set_blend_mode(bm_normal);

obj_torch, Depth -5

Events:

End Step

Actions:

size = 100;
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_orange,c_black,false);
surface_reset_target();
draw_set_blend_mode(bm_normal)

obj_torch2 , Depth -5

Events:

End Step

Actions:

size = 50;
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_orange,c_black,false);
surface_reset_target();
draw_set_blend_mode(bm_normal)




Other Videos By MC Designs


2019-06-07Game Maker Studio: (Part 1) How to Scroll Left to Right on Screen.
2019-05-25Game Maker Studio: How to Make an Object, Play & Stop Sound at a Location.
2019-05-18Game Maker Studio: How to Create Monsters, to Move Randomly Toward Player.
2019-05-04Game Maker Studio: How to Fix a Corrupted GMX File Download.
2019-04-21Game Maker Studio: How to Master Wind, Rain & Object Follow.
2019-04-13Game Maker Studio: How to Create Birds Eye 3D Rain.
2019-04-12Game Maker Studio: How to Create a Sprite Color Change & Instance Change.
2019-04-06Game Maker Studio: How to Create Rotating Planets with Light & Shadow.
2019-03-31Game Maker Studio: How to have Light Follow the Player.
2019-03-30Game Maker Studio: How to Master Gravity, Jump, & Wall Collision.
2019-03-23Game Maker Studio: How to Create a Flickering Light Glow.
2019-03-16Game Maker Studio: How to Create a Different Pause Screen.
2019-03-09Game Maker Studio: How to Create Slide in Fade using Code.
2019-03-09Game Maker Studio: How to Create Fade In using Code.
2019-03-03Game Maker Studio: How to Master Resetting Score & Timer.
2019-03-02Game Maker 8.1: How to Create a Moving Fireball.
2019-02-23Game Maker 8.1: (Part 2) How to Create a Second Gun, & Ammo Countdown.
2019-02-23Game Maker 8.1: (Part 1) How to Create a Second Gun, & Ammo Countdown.
2019-02-16Game Maker 8.1: (Part 3) How to Reuse Shot Gun, once you have Ammo & Custom Message.
2019-02-10Game Maker 8.1: Fake 3D FPS (Part 2), How to Unlock a Door & Change Face icons.
2019-02-02Game Maker 8.1: Fake 3D FPS (Part 1), How to Pickup Gun, Ammo, & Top Down.



Tags:
windows
pc
android
device
light
glow
flicker
flick
dark
room
shadow
how
teach
game
maker
studio
create
torch
torches
timer
instance
move
learn
code
appear
surface
draw
reset
target
view
hview
wview
rectangle
color
blend
mode
set
subtract
normal
gmx
size
ellipse
depth