Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Sledgy on Tue 08/12/2009 09:20:49

Title: Handmade inventory
Post by: Sledgy on Tue 08/12/2009 09:20:49
I can't create new inventory. I mean there aren't any items, even I marked "Player starts with this item", just empty inventory.

I created inv at bottom with popup effect. And it's always empty. AddInventory and etc don't work.

WTF?


I use AGS 2.61

***

image:

(http://pic.ipicture.ru/uploads/091208/pkRzU964IO.jpg)


item with player
---
inventory gui
---
test game - show inv (but no items!!!)
Title: Re: Handmade inventory
Post by: Gilbert on Tue 08/12/2009 09:50:42
I made a quick test with V2.6sp1 and it worked for me.
Have you changed the player in-game? Note that each character has his own inventory. That check box will only gift that item to the starting character.
Title: Re: Handmade inventory
Post by: Sledgy on Tue 08/12/2009 11:01:35
I use char0 as player and don't change it.


Maybe I incorrectly run inventory gui?

I just use 'GuiOn(0);' without InventoryScreen() and etc. I see inv, but without items, even I use 'AddInventory' in game. Empty inv!


I can send you project to PM, maybe you can do it?
Title: Re: Handmade inventory
Post by: Khris on Tue 08/12/2009 12:50:53
You have to assign a character to the inv window (in this case char0). I don't remember how that was done back when 2.61 was current, why are you using that years old version anyway?
Title: Re: Handmade inventory
Post by: Sledgy on Tue 08/12/2009 13:06:07
Mafucka, it's alive!!!! I mean inventory works in 2.72! Damn.

I used 2.61, 'cause it's perfect AGS what I knew. Ahem.
Title: Re: Handmade inventory
Post by: Gilbert on Tue 08/12/2009 13:14:55
Please refrain from using such rude words on the forums. :P

As far as I remember you don't need to assign a character to the inventory in old versions of AGS (in fact you couldn't do that), as the contents will change accordingly depending on which character is currently active.

Edited:
Alright, since you have sent me the files I've had a look and found the problem. The problem is that the Inventory object is not tall enough to display its content, just increase its height and the items would be shown. I think it's related to those inventory item spacing, etc. settings, which I'm too lazy busy to check whether these settings were even added in such versions.