edited March 2020 in ORK Scripting
Hi GiL,
I have an item which ID is 9, let's call it Item9.
It's weird that I can't add this item to the inventory by script, other items have no problem.
ItemShortcut test = new ItemShortcut(9, 4);
bool success = ORK.Game.ActiveGroup.Leader.Inventory.Add(test, false, false, true);
But if I have this Item9 added in the inventory(even I consume up this Item9) before running into this Inventory.Add() script, the script will work.
Also, I checked that the settings of Item9 are the same as the others.
And the Item9 in the itembox(ItemCollector) can be collected even there is no Item9 in the inventory.

It's ok for me to add one Item9 to inventory at the start of the game, but I still want to know why this happens.


I'm Sorry!! It's my fault. The item was added but it was covered by another menu part.
Post edited by bitmore on
  • That's pretty strange - is the script use reporting a success?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • bool success_1 = ORK.Game.ActiveGroup.Leader.Inventory.CanCollect(test);
    bool success_2 = ORK.Game.ActiveGroup.Leader.Inventory.Add(test, false, false, true);
    both success_1 and success_2 are TRUE.
    Looks like only happen in this project, I can't reproduce this in a new project too.
  • bitmore said: I'm Sorry!! It's my fault. The item was added but it was covered by another menu part.
    So... fixed?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • gamingislove said: So... fixed?
    Yes it's fixed.

Sign In or Register to comment.