Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Elessar on Wed 06/06/2007 03:31:57

Title: Animated charactor won't recognize walk-behinds [Solved]
Post by: Elessar on Wed 06/06/2007 03:31:57
When animating a character:

character[FROG].IgnoreWalkbehinds = false;
character[FROG].Animate(5, 0, eOnce, eBlock, eForwards);


the character won't go behind the walk-behinds. The baseline is low enough (the bottom of the screen :P), and the character is set to use walk-behinds (see above), but when I run this code, the animation appears in front of the walk-behinds. Is there something I'm missing, such as an option for animations to run behind walk-behinds?
Title: Re: Animated charactor won't recognize walk-behinds
Post by: Gilbert on Wed 06/06/2007 04:01:33
What's the y-coordinate of the character? if it's lower than the walkabehind's baseline he'll still be in front of the walkbehind. Since you mentioned the baseline's at the bottom of screen, if the character's feet are a bit out of the screen you still need to set the baseline of the walkbehind lower (via SetWalkBehindBase(), I think you can't set it out of screen directly in the editor).

Also, make sure that the baseline for that particular walkbehind is set properly, as individual walkbehind has its own base.
Title: Re: Animated charactor won't recognize walk-behinds
Post by: Elessar on Wed 06/06/2007 04:09:42
Yeah, that was it. Thanks!
Title: Re: Animated charactor won't recognize walk-behinds
Post by: Elessar on Wed 06/06/2007 06:01:17
Now the NPC is animating in front of the player charactor, except for the part which is behind the walk-behind. Thus the NPC animates in front of the player, except for some on the top and some on the bottom. Is there a way to make the NPC totally stay behind the player?

EDIT: I figured it out: I had to adjust the player's baseline to be lower than the NPC's.