A Character can have multiple Inventory Windows?

Started by BowsetteGamer, Sun 07/01/2024 13:44:55

Previous topic - Next topic

BowsetteGamer

Hello guys, how are you?
I have a question, how can I put a second inventory window on the same character so that specific items (objects) are moved to that second inventory window?
Please help me, I'm a little confused ???

Khris

You need to use a dummy character for this since each character has their own inventory.
Set the 2nd InvWindow's Character ID to the one of the dummy.

Transferring an item is done by:
Code: ags
  player.LoseInventory(iQuestItem);
  cInvDummy.AddInventory(iQuestItem);

Using the items of the 2nd inventory is a bit tricky because AGS only supports setting an item as player.ActiveInventory if it is actually held by the player, so you might need to write your own handling.

SMF spam blocked by CleanTalk