Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mugs on Mon 13/02/2006 04:22:03

Title: Multiple inventories for one player.
Post by: Mugs on Mon 13/02/2006 04:22:03
Is it possible to have multiple inventories for "one" player character?

I'm making a game that has multitiple catagories.Ã,  For example: Foods, Tools, Papers, etc...Ã,  Every object that you pick up will end up in one of the catagories.

If it's possible to have multiple inventories(catagories) for "one" player character,Ã,  what should I do?
Title: Re: Multiple inventories for one player.
Post by: Ashen on Mon 13/02/2006 09:57:27
AFAIK, it's not directly possible. The simplest way to get the effect would be to use other character's inventories for the different categories.

Other than that, you could use arrays to store which items from the categories the player has, and make a custom function to empty their inventory and refill it as needed.

It might also be possible - although if it is it'll probably be quite difficult - to limit which items are shown in an InvWindow. Then if you group the items in the Editor (1-20 are 'Food', 21-40 are 'Tools', 41-60 are 'Papers', etc) you can create the illusion of multiple inventories (InvWindow 1 only shows Food, InvWindow 2 shows Tools, etc).

Using different characters is definitely the easiest way, though