draw_background drawing over character[Solved]

W

Wild_West

Guest
Just as the title says, I'm using draw_background to change the color of the sky in a certain room when my player is near one of 6 different objects.
But the backgrounds are drawing over my player and I can't see him.

Any idea how I can adjust that, I've already tried changing the instance order of objects in the room, I changed the depth of the objects drawing the backgrounds so I'm not sure what else to do.
Especially since all the other objects that are in that same room CAN be seen above the background.

This is the line I use to do so, nothing fancy

if distance_to_object(player_parent_object) < 500
draw_background(mender_sky,view_xview,view_yview);

I only use 1 view in this room and that's all the info there is relating to the problem.
 

ParodyKnaveBob

The Laughing Rogue
Howdy, Wild_West,

One way or another, what's likely happening is either 1. the background is drawing after the character or 2. the character is not drawing at all. You can confirm #2 by drawing partially transparent backgrounds. You can check #1 by examining the render surface in the debugger, stepping through the code one line at a time.

Does your player instance ever show up? (I can't help but wonder if you're overriding the object's Draw Event...)

Regards,
Bob $:^ J
 
W

Wild_West

Guest
Howdy, Wild_West,

One way or another, what's likely happening is either 1. the background is drawing after the character or 2. the character is not drawing at all. You can confirm #2 by drawing partially transparent backgrounds. You can check #1 by examining the render surface in the debugger, stepping through the code one line at a time.

Does your player instance ever show up? (I can't help but wonder if you're overriding the object's Draw Event...)

Regards,
Bob $:^ J

I don't have any draw event code in my player or it's parent. But I DID check something in the room editor after you mentioned the render surface thing.
I stupidly forgot to UNcheck the box "clear background with windows color".
That was what was screwing it up, now my player shows up like he should.
I was never sure what that checkbox did, so I guess not knowing was my first mistake. :p

Thanks though I'd have missed that if not for your comment
 
Top