• 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!

[SOLVED]Draw surface to all views

R

Rax135

Guest
Hi everybody,

im using Gamemaker Studio 2. I was just wondering: i wanted to make some "fake" light effects by creating a surface and subtracting the light sprites from it so it kind of creates a light effect. Everything is actually working fine until i wanted my game to be splitscreen. Now drawing the sprites to the surface is actually working but not in every view. I only get one view to draw the sprites while the other view remains dark (Or i think views are now called cameras or so. Im new to GM2 :D). Would be nice if anyone could help me. Please write if you need some code for this.

Drawing the flashlight from the players actually worked but not the lamps (as seen in the right view but not in the left view).

Thanks.. :D

EDIT: All i had to was to change the active view. Example:
Code:
view_visible[0]  = true;
draw_surface(surface0,0);
view_visible[1]   = true;
draw_surface(surface,0,0);
 

Attachments

Last edited by a moderator:
Top