how to make an inventory like in hello guest?

Well many aspects to what you are saying, so here is high level description of what you need, in an extendable format.

  • Inventory System : You need an inventory system that does the book keeping. Add to Inventory, Search Inventory, Remove From Inventory.
  • Inventory Item : You need data assets . Think this are static data description of what an item is. (picture, count. mesh, type, use on pickup etc define as you need) once you define an item and its added to inventory you can always access same variables.
  • Save State / Persistency : Even though an item is defined and you have an inventory system (a bag). What happens between gameplay sessions is not saved. Like you added something to your bag, and stop editor, play again there is no item there. So you have to save player data (items + whatever you want) before game end and retreive that for next session so its persistent. Here is a nice tutorial for an extandable blueprint save game system to get you started. For more advanced systems you will need C++ but think you don’t need that right now.

If you will create items (dynamic keys) thats another issue and we can take another approach as uniquie id or range to fit in same system or extend. However I don’t think thats the gameplay case for you.

In a nutshell to recap.

1- Inventory System: Actor component, that have item data arrays added to it and removed from it.
2- Inventory Item: A structure for item descriptiion. When interacted this data gets written to inventory system.
3-Save Game : Write and Load save game object and retrive its related inventory data on gameplay begin and end.

Let me know if it helps.