Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Puppetsj on Sun 02/11/2008 06:42:03

Title: Two characters on same Y coordinate, who is "drawn" first?
Post by: Puppetsj on Sun 02/11/2008 06:42:03
If two characters are on the same Y coordinate and one is visually blocking the other, what determines who gets drawn first? Is there any way to change it?
Title: Re: Two characters on same Y coordinate, who is "drawn" first?
Post by: Dualnames on Sun 02/11/2008 11:29:27
I think it's the baseline property and if it is yes you can change it Character.Baseline=numberofchoice(y coord);

Check the manual for more info on the baseline thing
Title: Re: Two characters on same Y coordinate, who is "drawn" first?
Post by: Khris on Sun 02/11/2008 12:44:05
I think it depends on the characters' IDs; although iirc that might change during the game (because characters aren't loaded all the time, just when they are in the current room, so their order in memory is going to change and then so is their drawing order. This might be complete BS though, it's just what I think I read some time ago).
Title: Re: Two characters on same Y coordinate, who is "drawn" first?
Post by: Pumaman on Sun 02/11/2008 15:11:46
If two characters have the same Y co-ordinate, the draw order is undefined. That means that AGS makes no promises about which one will be in front.

If you want to specify it, you can use the Baseline property.