Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: James Kay on Tue 09/12/2003 12:33:28

Title: Objects vs. Walkbehinds
Post by: James Kay on Tue 09/12/2003 12:33:28
Sorry for the n00b-ness and apologies if this has been asked before:

How can I make objects (some incidental animations I have I do with objects) ignore walkbehind areas? E.g., a watercooler has a subtle water bubbly animation going on, done with an animated object. It is not visible however as it is near a corner the player can walk behind. Even putting the animation's baseline lower than the walkbehind baseline doesn't seem to work, and I don't want to put it at the bottom of the screen because the player can walk in front of it.
Title: Re:Objects vs. Walkbehinds
Post by: SSH on Tue 09/12/2003 12:45:07
Maybe you want the function SetObjectIgnoreWalkbehinds?

Title: Re:Objects vs. Walkbehinds
Post by: Timosity on Tue 09/12/2003 12:52:08
you can set objects to ignore walkbehinds eg.

SetObjectIgnoreWalkbehinds (1,1); // will make object 1 ignore walk behinds.

but if the object still needs to be behind other walkbehinds you'll have to play around with other baselines.

You can change object, walkbehind and character baselines in script with

SetCharacterBaseline(CHARID, int baseline);

SetObjectBaseline(int object, int baseline);

SetWalkBehindBase(int area, int baseline);


which can get tricky in some circumstances but it is possible.

eg. if 2 characters are standing in exactly the same spot physically on the screen, but one is walking over a bridge and one under it, it can be done by manipulating different baselines.

Edit: yep you beat me, but I did add in some other ideas if it wasn't just the first bit
Title: Re:Objects vs. Walkbehinds
Post by: James Kay on Tue 09/12/2003 14:17:17
Ta very much! It works a treat. You guys are geniusses (genii?).
;D
Title: Re:Objects vs. Walkbehinds
Post by: After on Tue 09/12/2003 19:37:52
I'm pretty sure that setting the bubbles baseline just below the water-cooler baseline should be enough. ??? It would certainly be the most direct solution.

I've been sticking objects on walls with no trouble - Walk behind or in front works as expected.
I wonder if it's animation related; e.g. the baseline gets reset at some point. I'll have to try it.