Download the project here: files.gearnoodle.com/godot_inventory_tutorial.zip If you want Drag&Drop functionality, I wholeheartely recommend these both: ua-cam.com/video/8cV-5ByZLOE/v-deo.html ua-cam.com/video/dCjMVoQ4l38/v-deo.html
You might want to take a look at the project files (in description or in my comment below) But yes, to change the gray ball to be something else but keep the scene the same requires something to do with @tool and PackedScenes and possibly set-get also, which I'm not yet very familiar with. I've made some tests with not-so-pleasing results. It works, but not very well :/
Is this tutorial for a global inventory or a player based one? Also, what does TM mean in this case? Am I allowed to copy paste and modify code from your project?
3 місяці тому
I think it works for both cases. TM is ... just a joke, maybe a bad one, whoops. Yes! Feel free to copy and paste from the project, I don't mind! :) That's basically the intention of this tutorial. But, I must say I've figured out a better inventory way lately at least for me, it includes keeping the rigidbody3d version of the item even in the GUI inventory slots at all times, even if it is not seen, but it is made visible always when the item is laid on ground. I'm trying to encapsulate the idea into solid package and make a tutorial about it some day in the future. Cheers!
Yes! Should work very well. Although I'm planning on making a new tutorial about even better method, in maybe a couple of weeks, but no promises. You see, I was recommended to learn to use Classes efficiently instead of this way.
good to know it could work! might not use it just yet as I'm a newbie/wannabe gamedev and I'm still at the basics, so maybe by that time you've made a new tutorial!
Download the project here:
files.gearnoodle.com/godot_inventory_tutorial.zip
If you want Drag&Drop functionality, I wholeheartely recommend these both:
ua-cam.com/video/8cV-5ByZLOE/v-deo.html
ua-cam.com/video/dCjMVoQ4l38/v-deo.html
How do I make it so I don't start with placeholder?
You might want to take a look at the project files (in description or in my comment below)
But yes, to change the gray ball to be something else but keep the scene the same requires something to do with @tool and PackedScenes and possibly set-get also, which I'm not yet very familiar with. I've made some tests with not-so-pleasing results. It works, but not very well :/
Is this tutorial for a global inventory or a player based one? Also, what does TM mean in this case? Am I allowed to copy paste and modify code from your project?
I think it works for both cases. TM is ... just a joke, maybe a bad one, whoops. Yes! Feel free to copy and paste from the project, I don't mind! :) That's basically the intention of this tutorial. But, I must say I've figured out a better inventory way lately at least for me, it includes keeping the rigidbody3d version of the item even in the GUI inventory slots at all times, even if it is not seen, but it is made visible always when the item is laid on ground. I'm trying to encapsulate the idea into solid package and make a tutorial about it some day in the future. Cheers!
can this be used for 2D as well?
Yes! Should work very well. Although I'm planning on making a new tutorial about even better method, in maybe a couple of weeks, but no promises. You see, I was recommended to learn to use Classes efficiently instead of this way.
good to know it could work! might not use it just yet as I'm a newbie/wannabe gamedev and I'm still at the basics, so maybe by that time you've made a new tutorial!