How to Make an Inventory System in Godot - Drag between Inventory & Hotbar (#7)
Вставка
- Опубліковано 9 лют 2025
- In this Godot 3.2 tutorial, I go over how to click and drag items between hotbar and inventory.
Part 6: • How to Make an Invento...
Project files: github.com/ark...
Character sprite used:
rvros.itch.io/...
Twitter: / arkevegames
You can't even imagine how you helped me with making my own game. Really thanks for your videos. They are short, understandable, and mainly helpful. Keep making devlogs and tutorials. I can't wait for next video. Maybe ideas for next videos can be pickup items, crafting, equip and use active(selected) items, dialog system / quest system or anything what would you like to do, because I think that every your video is incredible. Trust me that your channel will grow crazy, just keep making great videos like this one. Already SUBSCRIBED. :D
watched the whole series. It was hard to keep up sometimes and I had to rework a lot for it to work for me and had to plug and play for many hours to get it right. I am however 1/10 very novice with my understanding of GODOT and the reason I have a 95% complete inventory is because of your helpful video. Thank you much!
Finally another video. I like your videos, tks
Your videos are very useful
!
I was having trouble with the drag and drop inventory system
.
Any chance the series will continue? I'd love to have the hotbar items persist when switching scenes like the inventory does. Also, the ability to remove items completely by "dropping" them outside of the slot regions and/or placing them within a scene area would be awesome. Appreciate all the work you've been doing so please keep 'em coming!
Yup, will be continuing this series
@@Arkeve That would be great, inventory is tricky and it's kinda hard to know how to build on what's done already.
Amazing video. I hope you do one to also build chest(s) that can have different inventories that the player can interact with simultaneously.
already waited for that video ;). ty
queue_free is the answer you are looking for. If you try adding your hotbar item to your inventory item or vice versa, the item will stick in place. Queue_Free will set you free.
How can you subtract items from the hotbar, if you use them?
to speed up replacing, the drop-down menu on search has a replace function. quite useful for changing variable names
thank you so much. Your vdo teach me a lot.
Wicked! I hope one day you'll make a tutorial on how to do a Terraria-esque crafting system, hell i'd probs be willing to donate some cash for that! :)
Good idea, I'll maybe do one in the future!
for some reason whenever i click items now, they get really small but go back to their normal size when i place them back down in the inventory. please help.
try changing the scale of your "UserInterface" and putting you Hotbar and Inventory to scale 1:1
Simply epic
Ive been loving these tutorials and have been getting up everyday just to see if you've uploaded you are a true hero.
But I have one request, I've been having trouble with the item drop part. I have added a bunch of items into my work in progress game but I cant find a simple way to have a flexible item drop. Byt that I mean the texture of the item needs to be updated for each item. So far I have been adding a new variable for each item but that is a grueling process so I was wondering if later on in this fantastic series you could explain a good way to update item textures in the item drop scene. Perhaps a way to put the item texture in the json file and let godot read the icon data and load it onto the texture?
You have the correct idea, you can use the item name to create the texture path (e.g. tex = load("res://images/" + item_name + " .png") ). That way you dont have to manually put the textures in
@@Arkeve Im still a bit confused is tex its own variable or is tex the texture of the sprite. And also when I tried both of those it said I couldn't put a plus sign in the load
i would have liked this video if i was looking for a code piece to copy-paste. i really understood what you do and why you do....
very good
that's it ?? you make this stuff very easy and only in 7 minutes.
No offense, but I don't think your approach is scalable. In a typical game, it takes several iterations to design items, and to make them interesting they need to have effects that access lots of data like character stats, location, etc.
You are putting all item data in scripts and constantly patching stuff in the UI as you add more stuff. This will get extremely complicated in the long run.
Why not use a relational database like SQLite and use some common UI patterns to update everything when something changes? That will make your life much easier.
Happy to watch your tutorial of this when you make one
Typically once you finish a tutorial you'll go back and optimize things. This system is a solid base system but of course you'll need to know how to code yourself to make it fit your game and scale with your game.