Adventure Game Studio | Forums

AGS Support => Beginners' Technical Questions => Topic started by: MrAbu on Wed 27/12/2017 03:56:00

Title: Issue with Baselines
Post by: MrAbu on Wed 27/12/2017 03:56:00
I'm having an issue with the main character being behind the objects and the other characters, even when he should be in front.

(http://i68.tinypic.com/2qbuhw5.png)

The red stick figure is an npc with a baseline of 5,

the green figure is the player with a baseline of 5,

the blue table and chair are an object with baseline 4.

From his placement, shouldn't the green figure be in front of everything else?

also mind the placeholder mspaint drawings.
Title: Re: Issue with Baselines
Post by: Vincent on Wed 27/12/2017 08:49:11
Red and green have the same baseline. So I believe red should have baseline 1 (near the top of the screen), blue table is in front of the red so should have baseline 2 (or any number greater than 1). Green is in front of everything it should have baseline 3 (or any number greater than the blue baseline).
Title: Re: Issue with Baselines
Post by: dayowlron on Wed 27/12/2017 15:28:28
You really should set the baseline to be the y coordinate of where the object meets the floor. If you don't then your character is going to always appear in front of it when it should be behind it.
Title: Re: Issue with Baselines
Post by: Kweepa on Wed 27/12/2017 17:58:41
Yes, for this scene you will need to split the walkbehinds into these groups.
Place the walkbehind for each group on the y coordinate of the 'corner' where the player character begins to go behind the object.
I'm not sure what art style you're going for but for a scene like this you'll want to draw the scene and walkbehinds in a paint package with layers (so you can line up the outlines easily).
(http://www.kweepa.org/step/ags/critics/MrAbuBaselines.png)
Title: Re: Issue with Baselines
Post by: Snarky on Wed 27/12/2017 19:03:58
If the tables and chairs are an object there should be no need for a walkbehind. Objects by default have the baseline at their bottom edge. As long as you don't override this, you're fine.

What you may need to do is split them into several objects (one for each table + its chairs), so that the baseline corresponds to the position of that particular table on screen.
Title: Re: Issue with Baselines
Post by: MrAbu on Wed 27/12/2017 19:51:21
Thanks guys! yeah I made all the chairs and tables one object, which caused issues, and my baselines were off too, I thought things would resolve themselves if i just left the baselines equal. Thanks