Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Anarcho on Sat 14/08/2004 18:45:18

Title: npc above walk behinds
Post by: Anarcho on Sat 14/08/2004 18:45:18
How do I get an npc to be above a walk behind?  I've got a guy on a couch that needs to be sitting on it, but i need the main character to be able to walk behind the couch.

I feel like there is an obvious answer to this, but i've looked around and can't seem to find it...
Title: Re: npc above walk behinds
Post by: Scummbuddy on Sat 14/08/2004 18:51:58
you need to place your walkbehind baselines. check the tutorial in the ags help file for more information, but basically place it at the base of the couch, but test it out and tweak it.
Title: Re: npc above walk behinds
Post by: Anarcho on Sat 14/08/2004 19:23:10
Well in the manual is says that you have to set the baseline at the lowest point of the walk-behind area.Ã,  And that's what I did, but since the couch is at an odd angle, I don't see how that's supposed to help.Ã,  Check it out.

(http://www.2dadventure.com/ags/emilytvroompromo.png)

This is the image as i drew it in paint shop, but the guy in the shorts is a character, and when i put him in the game he's behind the couch since i made the couch one big walk-behind.Ã,  now i can take out the walk behind shading around where he's sitting, but that's hard to do...and more importantly, his arm swings up to answer a cell phone, and since i need that ash tray to be a walk behind, it looks like his arm disappears for a second.Ã, 

I don't see how the baseline would have any effect on this problem.Ã,  There's no way to just make it so the charcter ignores the walk behind area?
Title: Re: npc above walk behinds
Post by: Barbarian on Sat 14/08/2004 21:29:07
You could set a character's baseline to be above or below the Walkbehind and perhaps find the effect you want, here's an example from the AGS manual:

SetCharacterBaseline(MAN, 120);

will move the character's baseline ( which can be used for testing collisions, or for walk-behinds) to a line positioned at y coordinate = 120.
Title: Re: npc above walk behinds
Post by: TheJBurger on Sat 14/08/2004 21:54:58
There's a simple way to do this,

SetCharacterIgnoreWalkbehinds (CHARID, int ignore)

The character will not be affected by walkbehinds.
Title: Re: npc above walk behinds
Post by: Anarcho on Sat 14/08/2004 22:30:34
AH, that's what i was looking for.  thanks!
Title: Re: npc above walk behinds
Post by: Etcher Squared Games on Sun 15/08/2004 00:17:26
I have a situation like this in my first game I'm making and I solved it in a different way...

the couch (table in my case)  I gave it 2 different walk behind sections..

in your case...

well I'm just going to make a pic and link it....
http://www.geocities.com/etchersquaredgames/ideacouch.JPG

with base lines and everything
Title: Re: npc above walk behinds
Post by: TheJBurger on Sun 15/08/2004 22:55:44
No problem.