Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Calin Leafshade on Wed 23/12/2015 04:14:16

Title: Getting an inventory item by ID.
Post by: Calin Leafshade on Wed 23/12/2015 04:14:16
I'm trying to enumerate all the inventory items but I can't find any way to do it. Usually its something like character[ i ] but inventoryitem[ i ] doesnt seem to exist.

So how do I get an inventory item by its ID?

EDIT: Ha, ok so it *is* inventory[ i ], but that array is only defined when you have at least one inventory item. The same goes for the gui[] array.