Closed Andargor closed 4 years ago
I don't remember. I found these commented out in my code: player.actor:UnequipInventoryItem(weapon) player.actor:EquipInventoryItem(weapon) player.human:GetItemInHand(0)
Yeah I saw those. The two first actually make a change, but with no indication if there's something in the slot. And GetItemInHand is for the weapons only. I was hoping to get all of the equipped gear, including armor.
I've also tried something like this, but it only seems to give the items that need to be rendered:
for i,userdata in pairs(player.inventory:GetInventoryTable()) do
local item = ItemManager.GetItem(userdata);
local itemEntId = XGenAIModule.GetEntityIdByWUID( item.id );
local itemSlot = EntityModule.GetSlotItemClassId(itemEntId);
(...do something with itemSlot...)
end
Have you figured out how to determine which items are equipped? I can iterate via
player.inventory:GetInventoryTable()
, but there is no indication of which items are equipped.