foreachloop in umg inventory

I managed to get it working.
now if an item gets picked up (and placed into the inventory array) the last item in the array gets a new button (by the refresh inventory event, that gets called by the pickup function), without a foreachloop. and when i load a savegame, the whole inventory gets rebuild from the saved inventory array (load inventory event, called by the load function) with a foreachloop. working nicely.