Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: dbuske on Sun 10/04/2011 22:43:54

Title: Keeping character visible on top of Object
Post by: dbuske on Sun 10/04/2011 22:43:54
I have a series of characters that are NPC's that are purposely put on top of photos that are objects.
Some of the NPC's are being covered by the photo object when the game runs.
It is not possible to move the NPC.
How do I keep the NPC visible on top of an object?
Title: Re: Keeping character visible on top of Object
Post by: Ryan Timothy B on Sun 10/04/2011 23:15:07
Lookup: Character.Baseline

Just set that Character's baseline 1 unit above the object's baseline.

If you were doing it by script instead of the Character's settings via the property pane, you'd do this (preferably in the before fade in function - unless the NPC is being placed on the photo mid-room):
cNPC.Baseline = oPhoto.Baseline + 1;

Or if the photo Object can never be walked behind, you can just set the baseline for that to zero instead of touching the NPC's baseline. oPhoto.Baseline = 0;
Title: Re: Keeping character visible on top of Object
Post by: dbuske on Sun 10/04/2011 23:19:12
Thank you.  I will try it out right now.
It works well. It was not scripted, so I just changed the object photos blocking the view of the NPC to a baseline of 0.