Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: aussie on Thu 13/11/2003 08:11:33

Title: Multiple inventories
Post by: aussie on Thu 13/11/2003 08:11:33
Just a simple question.

Does AGS currently support multiple inventories for the same character?
Title: Re:Multiple inventories
Post by: Gilbert on Thu 13/11/2003 08:24:01
No, currently you need to use dummy characters if you want more than one inventories.
Title: Re:Multiple inventories
Post by: aussie on Thu 13/11/2003 08:28:01
That sounds clever, actually.

How do you actually do it to add an inventory item to a non-player character?
Title: Re:Multiple inventories
Post by: Gilbert on Thu 13/11/2003 08:33:55
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.
Title: Re:Multiple inventories
Post by: aussie on Thu 13/11/2003 09:11:20
I see.

Cheers.