Multiple inventories

Started by aussie, Thu 13/11/2003 08:11:33

Previous topic - Next topic

aussie

Just a simple question.

Does AGS currently support multiple inventories for the same character?
It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

Gilbert

No, currently you need to use dummy characters if you want more than one inventories.

aussie

That sounds clever, actually.

How do you actually do it to add an inventory item to a non-player character?
It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

Gilbert

Just modify that character's inventory content direct via the character[...].inv[...] variables. For example, to add inv. #3 to inventory of character BLAH, use:

character[BLAH].inv[3]++;

You can do any arimetic manupulations with these variables.

if you want to display the inv. contents, just change to that character temporily before displaying an inv. GUI.

aussie

It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

SMF spam blocked by CleanTalk