• Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!

GMS 2 Set Blendmode for layers?

Hey friends. Okay so here is what I am after. I know how to set the blendmode of a specific object using the below code. But I want to, and am trying to, apply the same "Add" blendmode to a specific Tiled Layer or the sprite asset itself. Whichever works. Here is what I tried with zero positive results.

Code:
C1 = layer_get_id("Clouds_L1");

if (C1)
{   
    gpu_set_blendmode(bm_add);
    draw_self();
    gpu_set_blendmode(bm_normal);
}
 
BoOm! Worked like a charm. :p Here is the final code I used...Pretty simple. AND I learned something. FYI the clouds at the top were was I was getting to ADD / Overlay...

I tried to upload a gif of him running around, but couldn't get file size small enough.
Grimli-ADD-Harvest-HobbyHaus.png

Set up two scripts...
START
Code:
if event_type == ev_draw
   {
   if event_number == 0
      {
        gpu_set_blendmode(bm_add);
      }
   }
END
Code:
if event_type == ev_draw
   {
   if event_number == 0
      {
        gpu_set_blendmode(bm_normal);
      }
   }
Then in the Room Creations > CREATE
Code:
C1 = layer_get_id("Clouds_L1");

layer_script_begin(C1, scAddStart);
layer_script_end(C1, scAddEnd);
 
Top