Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: gypsysnail on Fri 13/10/2006 15:10:15

Title: inventory box pop up and walk-behind area
Post by: gypsysnail on Fri 13/10/2006 15:10:15
Hi I have been doing tests on a game I am practicing making and I clicked on the inventory at the gui and the inventory box came up, no inventory in it yet - not up to this stage - but when I try to close the box it wont close at all. Any problem I need to be aware of?

Another problem, where I made a walk-behind hotspot of a tree, yes it kind of works that I can see my character go behind the tree, and character stops at the baseline in the right place that I meant it to be at which is good but if I move her a little bit straight onwards down, still in the walk-behind area, she goes right through the tree. What is the solution for this particular problem? Thanks for your time :)

EDIT:
Thanks you guys for the help, I am getting there with it, getting it slowly. Now umm sorry to ask again, but does anyone know how to solve the inventory box pop up box - not being able to close this box at all...?
Title: Re: inventory box pop up and walk-behind area
Post by: Alynn on Fri 13/10/2006 17:20:22
The easiest way is to move your walkable area a bit farther from the tree so it isn't possible to have that sort of clipping. In other words the character needs to be limited so they can't move directly downward through the tree.
Title: Re: inventory box pop up and walk-behind area
Post by: Khris on Fri 13/10/2006 19:15:42
Quote from: gypsysnail on Fri 13/10/2006 15:10:15and character stops at the baseline in the right place that I meant it to be at
Don't confuse baselines with walk-to points.
By setting the baseline of a walkbehind, you specify a certain y-coordinate.
As long as the character's feet are below this line (i.e. the character's y-coordinate is bigger than the baseline's), he's displayed before the walkbehind. When the character is above the baseline (i.e. his y-coord is smaller than the baseline's), he's displayed behind it.

To prevent the char from walking through trees, as Alynn said, make holes in the walkable areas.
(You don't have to redraw the walkables, just select a color that's unused yet, draw the hole, then delete the area.)

I don't know if this is relevant here, but keep in mind that a walkable area and a walkbehind are different in an important way: A walkable area specifies the parts a character can walk on, while a walkbehind specifies which part of the background he'll disappear behind.

Here's a little drawing I did quite some time ago:
(http://img277.imageshack.us/img277/7057/explainhol2kc8.png)
Title: Re: inventory box pop up and walk-behind area
Post by: gypsysnail on Sat 14/10/2006 08:40:44
I am really pulling my hair out! It just does not work!!! Since I saved the game and went to bed last night then came back to work on it, the display message in the interaction box has gone, so I added a new one, but when testing the game the old message shows instead of the new one. and on top of it, the character still goes thru the tree even tho she looks to be walking behind it. What is going wrong? I really dont understand a lot of this sorry. Pls help, really desperately frustrated
Title: Re: inventory box pop up and walk-behind area
Post by: SilverWizard_OTF on Sat 14/10/2006 11:05:00
Look, about the walk-behing stuff, first off all make sure that you have checked the baseline is in correct place. Secondly, are you sure that you don't have any walk-able area that "fills" all the tree by mistake? Ah, and maybe you have to make smaller the area of walk-behind, to fill only the tree-ground-level area (not the entire tree).

About the old and new message, are you sure that you don't have any script command like "DisplayMessage"..."" ??? Check it out.
Title: Re: inventory box pop up and walk-behind area
Post by: gypsysnail on Sat 14/10/2006 12:49:33
Thanks everyone for the help, all that has been solved in my questions.
Title: Re: inventory box pop up and walk-behind area
Post by: gypsysnail on Sat 14/10/2006 19:14:13
I guess I better back up a little with this thread - it seems we have forgotten the question of the inventory pop up box, it wont close when I click on Ok. I am using the default template for the moment. What would the script need to have in it to make the inventory pop up close again when I click Ok? This will be a good lesson for me to learn when I make my own template. Thankies :)
Title: Re: inventory box pop up and walk-behind area
Post by: GarageGothic on Sat 14/10/2006 23:49:20
I don't know the name of your Inventory GUI (I didn't even know there was one in the default template). But if the GUI is called inventory, the code to close it would be:
gInventory.Visible = false;
Title: Re: inventory box pop up and walk-behind area
Post by: gypsysnail on Sun 15/10/2006 03:46:51
Thanks! Solved! :)