Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: cipberbloom on Sun 09/05/2021 10:35:39

Title: Z-order: Characters vs Objects [SOLVED]
Post by: cipberbloom on Sun 09/05/2021 10:35:39
Hullo, all!

Is it the default for objects to be drawn in front of characters, and if so is there a way around this?

Thanks again to the community.  :)
Title: Re: Z-order: Characters vs Objects
Post by: Snarky on Sun 09/05/2021 20:37:50
In short: no.
Room objects may appear in front of or behind characters. It depends on their Z-order, which by default is the y-coordinate of their bottom edge. (This gives the expected result in many common situations. If it isn't what you want, you have to override it.)
Title: Re: Z-order: Characters vs Objects [SOLVED]
Post by: cipberbloom on Mon 10/05/2021 02:43:41
Quote from: Snarky on Sun 09/05/2021 20:37:50
In short: no.
Room objects may appear in front of or behind characters. It depends on their Z-order, which by default is the y-coordinate of their bottom edge. (This gives the expected result in many common situations. If it isn't what you want, you have to override it.)

Brilliant--thanks so much! I didn't want to integrate the objects (torches in this case) into an animated background, so I just put

oTorches.Baseline = 1;

into

room_Load()

For anyone reading this later, 1 is as low as it goes (no zero/0).

Again, thank you (and a third thanks for your having written the SpeechBubble module)!  :-D

All the best,

Skeevy