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?

in Engine by (506 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.