Sam04
Member
Just like that the draw event of some instances seems not to be drawing anything.
I was working on a project when I noticed that an instance was not drawing what it was suposed to draw, which at first was weird because the changes I've made since the last time it worked should have no effect on the instance draw event.
So I did a bit more testing to find out the cause of the problem.
I am working with the current IDE version (2.2.0.343 runtime 2.2.0.258) on a Windows 7 machine. I am not really sure if this is a bug or if there is a hidden option that I accidentally activated without noticing. I am using the free version so I am unable to test on any platform that isn't Windows which I supose it might be important because I've searched in this forum and have found other kind of problems with Windows 7 but I am not completely sure since I couldn't find any other problem like mine.
Thanks in advance for all the help.
[Edit 1: Increased the bullet list with things mentioned in the answers on this thread.]
[Edit 2: Added more items gotten from this amazing guide made by FrostyCat. I am still too new to be allowed to post links to the guide and the user but you can check them lower in this post.]
I was working on a project when I noticed that an instance was not drawing what it was suposed to draw, which at first was weird because the changes I've made since the last time it worked should have no effect on the instance draw event.
So I did a bit more testing to find out the cause of the problem.
- I've made sure the object is set to visible and that there is no code anywhere changing that.
- I've made it the only object in the room and still no difference.
- I've tried deleting the background layer to see if it had any problem but I saw no change. (Keep in mind that I was only using the default instance and background layers that appear when you create a new room).
- I've created a new empty room with the sole purpose to test this single object and it was still not drawing anything.
- In all of those previous cases I've replaced the entire draw event code for a single draw_rectangle();.
- I've made sure that what I'drawing is within the boundaries of the room.
- Just to make sure I also preceded it by a draw_set_alpha(1); and a draw_set_colour(c_black);.
- This only happens with one specific object.
- Said object has a valid depth, it uses the one in the layer it was placed (which has a depth of -3) and the code never changes this.1
- The object has no sprite assigned and everything in the draw event pertain to drawing shapes and other sprites.1
- Said object still runs the code in the draw event. Writing show_debug_message("something"); does indeed shows "something" in the debug window.
- I have tried with both relative and absolute positions both yielding the same result. Said object does not use physics and the other varables phy_position_x and phy_position_y do not work on them.2
- This also works even when it is inside logic conditioning, so it also works as expected when I write something like:
Code:
if (1>0) {
show_debug_message("This is suposed to be shown");
}
if (0>1) {
show_debug_message("And this is not suposed to be shown");
}
- So it still runs the code inside the draw event but refuses to draw anything at all.
I am working with the current IDE version (2.2.0.343 runtime 2.2.0.258) on a Windows 7 machine. I am not really sure if this is a bug or if there is a hidden option that I accidentally activated without noticing. I am using the free version so I am unable to test on any platform that isn't Windows which I supose it might be important because I've searched in this forum and have found other kind of problems with Windows 7 but I am not completely sure since I couldn't find any other problem like mine.
Thanks in advance for all the help.
[Edit 1: Increased the bullet list with things mentioned in the answers on this thread.]
[Edit 2: Added more items gotten from this amazing guide made by FrostyCat. I am still too new to be allowed to post links to the guide and the user but you can check them lower in this post.]
Last edited: