Help deleting an index from array.

Hello, i have a problem with an array and i dont know what to fix this.

I have an item inventory in my main character. When the player gets ammo, weapons or keys, this items add at the inventory. But later in the game, i need to clean the keys inventory. My idea is to save in an int the index of the keys, then use this index to delete it in the array. But this wont work becasue when the player load game, the index of the keys on the inventory changes…i tried to do it with tag in the keys, but i cant fix the problem.

Its there a way to search in an index, with the name of the blueprint or containing a text string? I dont know how to localize the keys once we load the game…

Thank you!!

Sorry about my english.

Is searching and deleting them when loading an option for you? Perhaps save them in a different array when saving?

I usually save a variable on the item when its added to inventory that follows the item around that holds the last inventory slot it was in so a way to reference where its currently at is always available. Not sure if that would work for you.

Hi, im trying to do this, but later how do you search this variable on the array? thanks!!

Just do a for each loop on the arrray and use an equal node to compare values and then do whatever you like with the ones that match your query. In a basic sense it looks like this.