Adding amounts together

Currently I have a system in my game where a player can pick up materials and a widget will slide on screen and say “Scrap - +5”
If the player picks up multiple scrap at once, it will overlap the previous widget and say whatever the new amount is. How do I make it so it will just add the previous amount to that so if I had 3 and 5
instead of it saying +3 and then +5 how would I make it say +8?

If it’s sliding in over the existing widget, you could probably do a get all widgets by class during construct to find the existing pickup counter, get its quantity var, and add it to the new one.

It sliding over the previous widget is a bug right now that I have to figure out how to fix.

Is the widget supposed to remove itself when a slide down animation or some such is finished playing? If so, use this quirk to your advantage and have the widget get other widgets of the same class and add the vars. Otherwise, you might need to store recent items picked up as a map var on the character, add them up there, and have an event on a looping timer to clear it so it doesn’t say +50000 scrap an hour later or something.