I'm trying to add/remove ONLY items that a player starts with, however InvWindow, Inventory, Game, player.Inventory* etc. doesn't contain a function to check for this, or a property.
How do I do the following (pseudocode):
//add all 'starts game with' items back to empty inventory
for (int x=1; x<=Game.InventoryItemCount; x++) {
if (player.InventoryItemStartsWith[x])
player.InventoryQuantity=1;
}
There's no way to do this as far as I know, but you may remember which items are in inventory at startup.
int startingItems[MAX_INV];
function game_start()
{
for (int i = 0; i < Game.InventoryItemCount; i++) {
startingItems[i] = player.InventoryQuantity[i];
}
}
Then you simply copy startingItems to player.InventoryQuantity backwards.