Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: mkennedy on Fri 20/10/2006 11:01:23

Title: Inventory for rooms. Is this desired?
Post by: mkennedy on Fri 20/10/2006 11:01:23
Does anybody else want an option to allow rooms to have inventories the same way characters can have inventories? This would allow programmers to implemtnt droping of items and picking up of items. Some possible functions:

room[int room_number].AddInventory(InventoryItem or number)
Used to place that item in the room.

room[int room_number].InventoryQuantity[InventoryItem or number]
This returns how many of the item the room has. Useful if you want check if a certain item appears in a certain  room.

room[int room_number].LoseInventory(InventoryItem or number)
Used to remove that item from the room.

Another idea would be the ability to determine a character's or room's inventory directly from the editor.

What do others think? Please give your opinion and input.


Title: Re: Iventory for rooms. Is this desired?
Post by: Rui 'Trovatore' Pires on Fri 20/10/2006 11:05:56
I support this suggestion, but it's workaroundable at the mo. You can set a room's porperty to X, and have X be the character whose inventory works for that room.

But it's a better suggestion in text games. Graphically, it gives rise to other issues.
Title: Re: Iventory for rooms. Is this desired?
Post by: Pumaman on Fri 20/10/2006 22:05:16
Some sort of method for allowing inventory items to be 'dropped' in rooms is certainly a good idea, but how best to implement it is something I need to consider further.
Title: Re: Iventory for rooms. Is this desired?
Post by: Kweepa on Fri 20/10/2006 22:28:44
Sounds like a job for a script module.
Title: Re: Inventory for rooms. Is this desired?
Post by: Janik on Sat 21/10/2006 20:55:28
Yes, it should be a simple matter to have module keep track of in which room each item has been dropped. Using a character per room would require a very large number of characters.
Title: Re: Inventory for rooms. Is this desired?
Post by: monkey0506 on Sat 21/10/2006 23:15:47
Since Steve called it I figured I'd let him have a crack at it...but he took too long. Sorry for stealing your idea...but..module (http://americangirlscouts.org/bbc.com/yabb/index.php?topic=28770.msg366090#msg366090).

And yes Janik...it was actually very easy. :=
Title: Re: Inventory for rooms. Is this desired?
Post by: Kweepa on Sun 22/10/2006 00:16:31
Damnit! :=
I was just suggesting. I wasn't working on a module.
Title: Re: Inventory for rooms. Is this desired?
Post by: monkey0506 on Sun 22/10/2006 00:22:17
Hehh....just covering my rear in case you had been working on something. ;) I actually like the idea of the module. Thanks for the suggestion :=