0 votes

Hi!
My player's inventory is stored in a dictionary. Keys are added to the dictionary when the player first obtains an item. Values are just variables.
What is the best/recommended way to display the inventory keys and their values in a 2d control node of some kind (something like itemlist so I can attach a texture to each key)?
Is this even the way to do this?

The other tactic I had in mind is to store inventory items as variables in a global script and when they're >0, add them to a menulist (instance a menu item for each).

Which is better, this or the dictionary. How does everyone go about player inventories?

asked May 2 in Engine by Macryc (289 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.