Jump to content

Strange behaviour of RemoveMeIR


Recommended Posts

I'm using RemoveMeIR to move a bunch of items from the player inventory into a container, for example all ingredients.
This works well but I noticed one strange thing and I couldn't find anything about it online.

 

Let's say I have 14 potatoes.

I run my loop, all 14 potatoes get moved into the container.
I open the inventory, I see no potatoes.
I open the container, 14 potatoes are in there.
BUT if I use player.GetItemCount Potato it returns 1.
If I use another RemoveMeIR loop on ingredients, none matching will be found, even while GetItemCount is 1.
If I use player.RemoveItem Potato 1, afterwards GetItemCount returns 0.
If I pick up a potato, I have one potato in inventory and GetItemCount returns 1.
If I manually drop that potato again, GetItemCount returns 0.

 

It seems that RemoveMeIR leaves a ghostly item in inventory after removing the last object of a stack, that will only get refreshed the next time one of that item gets added/removed. Can anyone confirm?

For now I stuff all base objects of items I remove in an array, then next frame run through the array and remove one item if there is one left.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...