JProclaimer
Member
My project was working perfectly fine. I had a space ship shooting bullets at enemies. Had done several quick playtests to check things I was editing. Immediately after a playtest, I decided to edit my bullet and flash sprites (they are separate sprites assigned to separate objects). As usual, I opened the sprites and edited them one at a time. With one of the sprite editors still opened, I ran the game, and both the bullets and the flashes were failing to draw their sprites. The bullet object was working and destroying enemies, indicating it was utilizing the sprite's collision mask. I went back and closed the editor, but still nothing. After re-editing the sprites to make sure they were obvious and impossible to miss, still nothing was showing. Even though I had touched nothing else in between playtests, I double checked the object's visibility setting, made sure the layers were visible, and restarted Gamemaker. Eventually I went into the bullet object and created a Draw Event, telling it to draw itself along with a sort of crosshair sprite. This crosshair was unrelated to the objects, but I had not edited it. It looked like this:
Lo and behold, it still failed to draw itself, but was drawing the crosshair sprite just fine. So I replaced the crosshair sprite with the sprite it was supposed to have. Just for fun, here's the code again:
Nothing was drawn. I created a new sprite, assigned it to the bullet, and inserted it into the draw_sprite() script, but that also failed to draw. It still drew the crosshair sprite, though. So I assigned the crosshair sprite to my bullet object, nullified my draw_sprite() line, and it didn't work. So then I reassigned the bullet sprite, told it to draw itself and crosshair sprite, and now it doesn't draw the crosshair sprite anymore. I then assigned my crosshair sprite to my spaceship, which then failed to draw itself. Then I reassigned my space ship it's original sprite, and that failed to draw. It's like an infection spreading across my sprites.
Is there anything I am missing? This seems to be the second bug I've had in the last few days.
Code:
draw_self()
draw_sprite(crosshair_sprite,0,x,y)
Code:
draw_self()
draw_sprite(bullet_sprite,0,x,y)
Is there anything I am missing? This seems to be the second bug I've had in the last few days.
Last edited: