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

GameMaker Mouse cursor disappears

beanflip

Member
I have a persistent GUI object that sets the sprite index of the mouse cursor and it's always worked but for some reason the mouse cursor is invisible in one room of my game. There isn't really anything special about this room. Clicking on things works, I just can't see it. I've tried disabling almost every other object in the room. I turned off the background to see if the cursor was somehow behind it. I messed with the instance creation order. There's nothing in the room creation code that would affect it. If I enter another room the cursor shows up again. Can anyone think of something else about this room I'm missing that might be peculiar?
 

Nidoking

Member
Sounds like a case for the debugger. Inspect the cursor instance in that room and make sure it's visible and the sprite index is what you expect. Maybe check that the draw event is running. That might give you an idea of what to watch for.
 

beanflip

Member
I'm still not sure what's going on here but I was able to fix it. All of my rooms start with an instance layer at a depth of -15,000 but the mouse cursor had a problem with the one in this room in particular. All I did was change the depth to a higher number and then change it right back to -15,000 again. Now the cursor shows up. My only guess is that it's choosing to draw the mouse cursor at a depth that's less than the limit of -16,000 so it's not being rendered.

Unless I'm mistaken we might have to call this a bug in Game Maker Studio.
 
Top