FindFreeLocationsFor function of GameInventory class in all cases returns 0.
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10
- Category
- Engine
Steps To Reproduce
EntityAI a = GetGame().CreateObject("Apple","0 0 0",true,false,false); array<ref InventoryLocation> b = new array<ref InventoryLocation>; for(int i = 0; i < 10 + 1;i++) { b.Insert(new InventoryLocation); }; Print(GetGame().GetPlayer().GetInventory().FindFreeLocationsFor(a,FindInventoryLocationType.ANY,b));
This will always return 0. With any combination of Flags / Items used
Additional Information
I have a slight suspicion its not even calling the right engine function.
Somebody might want to look into that.
Event Timeline
Comment Actions
Function is now there but, function returns only first match for inventory not all of them.
Meaning if you have Vest and Backpack with nothing in it, call that function on Players inventory with an "Apple"(1x1) object it will return 2.
If you call it again for Vest that is empty it will return 1, even tough that vest has X spaces.
Comment Actions
Indeed, that's what it does. It's basically FindFreeLocationFor ran on individual cargos - It informs you which cargo's got free space.