Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Buckethead on Mon 06/11/2006 09:24:18

Title: messy inventory [SOLVED]
Post by: Buckethead on Mon 06/11/2006 09:24:18
hi,

I have made an custom inventory. But if I take more then 2 inventory items they often are placed over each other, like this:

(http://img83.imageshack.us/img83/5792/mesinvlb2.gif)

What can I do to clean this up?
Title: Re: messy inventory
Post by: R4L on Mon 06/11/2006 11:41:29
Why don't you make it bigger? Or set the amount of inv items per line in the script (Manual.)
Title: Re: messy inventory
Post by: strazer on Mon 06/11/2006 11:54:02
I think what R4L means is to increase the inventory control's "Item width" and "Item height" properties in the GUI editor.
Your problem is probably that the inventory item graphic exceeds the slot size, so the item overlaps into the other slot. So make the graphic smaller or the item slot bigger.
Title: Re: messy inventory
Post by: Ashen on Mon 06/11/2006 12:20:48
Yes, you can't directly “set the amount of inv items per line”, it's worked out based on ItemWidth and the Width of the InvWindow itself. As strazer said, the most likely solution is to alter the InvWindow's Item Width and Height properties (can be done in script, or in the GUI editor). They'll need to be at least the size of the largest Item sprite you have, or you'll get that overlapping.

Of course, if your Items have very different sizes (like the blue thing and the screwdriver) you could end up with too much space between some items. If so, you might want to redraw your item sprites, to have a more standard size.
Title: Re: messy inventory
Post by: Buckethead on Mon 06/11/2006 14:55:13
Ok I changed the height. Now the 2 items indeed are too far away from each other. So what sizes should I use now? I don't exactly know what you mean with more standard.
Title: Re: messy inventory
Post by: Gilbert on Mon 06/11/2006 15:24:22
How far away depends on how you drew your own sprites. One problem I see of your item sprites is that they're of drastically different in dimension, which is hard to provide an optimal value, unless you fix them to have more similar sizes.
Title: Re: messy inventory
Post by: Ashen on Mon 06/11/2006 15:27:21
Yes, that's what I meant, they should all be about the same size (e.g. all the size of the blue thing, or all the size of the screwdriver). Exactly what that size should be depends on things like game resolution, GUI size, your preference, etc - I didn't mean to imply there was a standard size for Inventory Items that ALL games should stick to, just that there shouldn't a lot of variation within any one game.
Title: Re: messy inventory
Post by: Buckethead on Mon 06/11/2006 16:20:09
ah well thnx for all the help. I've changed the sizes already and it seems to work smoothly now.  :) many thnx!