I am going to give this a try tomorrow. Thank you Snail! :)
It is sort of how the item inventory system works at the moment when scanning the container list and feeding into the GUI list.
But in my case the loop runs by the number of items that are in the container list - runs once when you open the equipment menu,another time when it needs to update the equipment at the use of an item. It is a bit overcomplicated.
What I dont like about it is that I need to write an entry for each individual item type/id in the code.
So when checking the number of items- check for potion during the countLoop,
another line of code - check for antidote during the countloop and so no.
Each item has its own ID value, but I cant use the loopindex to point to it in my expression. It just wont run the code when I do that (conditions not met) .
After the checking stage, I transfer all the temp count values to an ini object. And reset them to 0 for the next time there will be a check.
Again I have to do this for each individual item (antidote, potion, etc)
Finally resetting the gui item list and adding the acquired data from the storage list to it again. I have to do this for each individual item I have.
I tried to use the fastloop index ID to point out to the item that is tested in my code, instead of manually adding a line of code for each item id check (potion "0", antidote "1" and so on), but it didnt work.
That is inneficient laborious work, but I cant figure out how to do it with less lines of code.
