Hi!
I set up AC for 2 players, with switching allowed. The game is turn based, and in between turns the active player can give items to the other player. Both players have an inventory menu, which uses the AC InventoryBox menu.
For the item giving, I created a custom menu, which grabs the RuntimeInventory.localitems, and displays their labels for the player to make a selection of items to give. (possible important note: this menu does NOT use the AC inventoryBox menu component).
After selecting a few items, the turn passes over to the other player. I do some RuntimeInventory.Remove() and Add() to register the transaction. When I look at the inventory menu of the new player, the transaction looks succesfull. All items I gave away, now apear in the inventory of Player2.
However, when I now go into the trade menu, again grabbing the localitems to create a list of tradeable items, I get a totally different list! In short: the InventoryBox menu's show the correct items after a trade, but the runtimeinventory.localitems seems to be screwed.
Any idea whats going wrong?
Comments