Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: fiaschetta on Tue 17/06/2008 02:16:37

Title: Character besides other
Post by: fiaschetta on Tue 17/06/2008 02:16:37
I have 3 characters, the third moves toward right but it is hidden from the second character... 
In practice he is behind the second... 
but I want he is before the secondo. How i do?
Title: Re: Character besides other
Post by: Ishmael on Tue 17/06/2008 02:19:27
Tried changing their z-order? I'm not sure if I understood you right, but if I did I think that's what you need.
Title: Re: Character besides other
Post by: monkey0506 on Tue 17/06/2008 02:58:04
The z-order actually is used to make characters "float". Basically their visible y-coordinate will be raised, but they will still trigger hotspot interactions. AFAIK anyway.

I think the character's baseline (Character.Baseline property in the manual) controls which character would get drawn in front.
Title: Re: Character besides other
Post by: Ishmael on Tue 17/06/2008 13:29:01
Ah, ofcource. I forgot characters have baselines nowdays too. So yeah, it's that. Z-order for GUIs controlled their drawing order.
Title: Re: Character besides other
Post by: Dualnames on Thu 19/06/2008 10:31:41
put this(preferably at game start or room_Load)
You want third walk behind second:
cThird.Baseline=100;
cSecond.Baseline=120;

or second behind third:
cThird.Baseline=120;
cSecond.Baseline=100;




Title: Re: Character besides other
Post by: Khris on Thu 19/06/2008 11:30:32
Also, make sure that the characters' sprites don't have borders on the bottom. They are positioned using the bottom center, so if the sprites are cropped correctly, they should appear in the right order in the game without any extra fiddling.