Loot containers and random loot in them

Hello ! :smiley:
I need to know, how to make containers, like in example fallout, where u come close to them, they open they loot content, and if thats made, how to make random loot spawn.
I know this is hard enough so if you can tell me at least how to begin and some tips, I would be grateful.

Thank you !

How I would approach this is create different loot objects (BP Classes). Then use a data structure where you can store each loot blueprint class in the structure. Then create a random integer (within the range of your data structure) to represent an index in that is in the data structure holding your loot, then spawn an instance of whatever BP class is at the random index.

Yea one part is now clear thank you, now, I need some tips how to make actual conatiner that will have few slots which hold that random loot… Is there any tutorial because i found hard to make it like create widget button or something …

I would set up a dynamic inventory system for both your player character and the loot containers. That way, you are not limited on slots for either container. (i.e. if you wanted to use a container to store items from your inventory).

This is a good tutorial on dynamic inventories, crafting, and stacking.

Going to have to remember that one for later.