Multiple inventories for one player.

Started by Mugs, Mon 13/02/2006 04:22:03

Previous topic - Next topic

Mugs

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?
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Ashen

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
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk