I can't make a inventory

Godot Version

4.5.1

Question

Hello, I am developing a game where I need an inventory that is always at the bottom center, but none of the code I have tried works.
Can you send me a tutorial or some code that will work?

There will be five objects, and each object can only be picked up once.

Hi,

I don’t know about any tutorial that does exactly that, but any tutorial about control nodes and UI in Godot should help.
Anyway, you can probably use a setup like this:

The Inventory node is anchored at center bottom of its canvas, and its size controls the size of the inventory panel.

The HBoxContainer is anchor in full rect and is responsible for the items being displayed in a row with a correct spacing. The five Item nodes are placeholders for the screenshot purpose only.

That looks like this:

1 Like