GMS 2 Sprite problems

Ash123

Member
My Sprites wont show!

I am a beginner and I was making one of my first games (Following Shaun Spalding Platformer series) and for some the sprites won't show (and settings were set to "visible", The layer was in front, And the objekt I had was out on the background)

What should I do?

Can anyone please help?

Thx

Ash123
 

FoxyOfJungle

Kazan Games
Is there a room before the one you placed the object in?
Didn't you accidentally click on the sprite offset when creating the sprite and now it is being drawn away?
 

Yal

šŸ§ *penguin noises*
GMC Elder
Here's potential things that could mess it up:
  • setting image_alpha to zero
  • destroying the instance
  • deactivating the instance
  • moving the instance very far away
  • setting the instance's depth so low it ends up behind everything else
  • changing the sprite to something invalid
  • setting image_xscale or image_yscale to zero so the object has no size
  • turning off automatic drawing before the instance's draw event is triggered
  • changing the projection or world matrix
  • switching drawing targets and using the wrong coordinate system
  • cache corruption

There's a lot of stuff you could try, but the most likely to find the problem are:
  • add a show_debug_message("i'm happening") in the object's draw event so you can tell if it's run. If it's not, it's either invisible, deactivated or destroyed.
  • draw a line between the center of the room and the object's position.
    • if the line goes offscreen, the object was moved far away
    • if the line ends at a random position but you can't see the sprite there, it's cache corruption or alpha/scale issues
    • if you don't see a line, the object is invisible, destroyed, or at the wrong depth
 
Top