(08-09-2013, 09:17 AM)Koh Wrote: the second represents specifics:
Second Value Meanings
[spoiler]
00 = Is there an item here or not (boolean).
01 = Item class (0 = knives, 1 = swords).
02 = Item ID of the item class.
03 = Special Quality ID (used for equipment).
04 = Name of Item
05 = Level Requirement
06 = Power Modifier
07 = Fort Modifier
08 = Mystic Modifier
09 = Stamina Modifier
10 = Energy Modifier
11 = Sprite for the item in the HUD.
[/spoiler]Code:global.inventory[25,10]=0;
Hmmm, you can approach it from another and clearer way. Going this route of "an index represents a property value" is very complicated and not very intuitive.
Since It seems you can't create classes without inheriting all the GM Object garage, I'd go with the approach of just creating multiple arrays that define a single property foreach inventory slot item.
Example:
Code:
int maxInventory = 32;
boolean[] slotOccupied = new boolean[maxInventory];
int[] Class = new int[maxInventory];
int[] ID = new int[maxInventory];
int[] SpecialQualityID = new int[maxInventory];
string[] Name = new string[maxInventory];
...
...
int[] EnergyModifier = new int[maxInventory];
Image[] SpriteIcon= new Image[maxInventory];How you would access a property:
Code:
global.EnergyModifier[25] = 0;It's obvious which inventory slot you're talking about and what property you're changing.

