• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Background layer shows above sprites



Recently started to get familiar with Game Maker after a long hiatus from any kind of hobby game development and found that in GMStudio 2 (Beta v23.1.1.67), I am having issues where the background always draws above sprites.

If I check the room settings, the depth of the background layer is 700. Instances layer is at 0.

I draw my sprite via the "Draw" event:
draw_sprite(spr_mysprite, anim_frame_drawn, x, y);
When I delete the background, I see the sprite fine.

Honestly am stumped and it's pretty frustrating as I had just started getting the hang of things again after stopping around 10 years ago.

If any idea happens to know if there is a glitch that causes this or some setting that causes it, I would greatly appreciate it!


And figured it out -- had a variable named "layer" I was using for internal logic and apparently that was a reserved object property.