Okay. Your inventory should just show the situation. The situation is baked in the Array. So, the inventory shows the array. Thats all.
To couple something to an array, you need common ground. The most easy way is to give the cells in the inventory a number (instance variable) and that same number on the X-as (y=0) in the array.
Now you can loop trough the (for each element) Array (with array.curX) and pick the cell with number = curX, to find the cell that goes with the array.
But you can also loop trough the cells (for each) and pick the corresponding element on the X-as = cell number, to find that element in the array that goes with the cell.
Maybe it makes no sense to you now, but i got a capx to back it up.
On the Y-axis you store whatever you like. Just make a comment in your events what each Y is supposed to be.
In this capx y1= animationframe and y2=amount of found items.
https://www.dropbox.com/s/gdj8qoo8532jr ... .capx?dl=0
I also wanted to show you how easy it is to use INSTANCES of the same object, that are differend by animationframe (or just by animation) to represent the items that can be found.
As you see, it is really compact in events, yet this capx does a lot of things.
Dont understand something, just ask.