Change Text for Single inventory item only

Hey All,

I’ve been following some guides on how to create an Inventory System and so far all good except for one minor issue I just can’t seem to figure out.

When dropping an item, I have a Sub-Event created to change the variable of my Inventory, create the item at the player and change the text of the ItemCount of the Inventory Slot to the amount it current has in the bag.

However, the Change Text changes the text for all items in the Inventory, not just the one dropped. I played around with “For Each” however I could never get it to only just change the text for the item that has been dropped to represent the new number.

For Example, if I have ‘3’ Health Potions and 1 Mana Potion, by dropping ‘1’ Health Potion all of a sudden both the Health and Mana potions show the item count text of ‘2’ in the bags.

Does anyone here know where I might add something in so that only the Text changes for the Item I am dropping to subtract 1.

Your events seem to be picking the ItemCount object by distance, The last event is decreasing the amount but it’s not using a condition to pick which text object. I think you can copy the condition from the previous line that deletes the object .

This would pick the closest object
image

1 Like

You are a legend :slight_smile: This worked perfectly.

Thank you!

1 Like