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

R

rob2d

Guest
Hi,

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:
GML:
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!
 
R

rob2d

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