Hello guys, I want to make an Inventory System with blueprints but i always watch tutorial and i always finish confused.
I want to make an inventory that i could pick object with the mouse, i could see them in the inventory with information and i could combine 2 objects to make a new one.
Thanks.
Anything Specific where you are running into Trouble?
Or do you want us to give you a fully functioning inventory system?
I always have some problems to compile and it never works in my proyect.
I don’t want to download an inventory, i want to create the system but i don’t know how to start.
I built a fully working Inventory System myself. Whats the problem?
Show us what you got.
Well, what you are describing is at least 5 different things. 1. Inventory 2. Inventory representation, 3. Pick up with mouse 4. See information about the object, 5. crafting system
each of them having a more or less complex challenge to them.
There are many ways to create an inventory and it’s impossible to tell just how far you’ve gotten. Does the character or player controller have an array that can hold objects? Do you have a general inventory widget? Can the objects from the array be represented in the inventory?
I don’t know how to start to create the Inventory System
How can I start the Inventory? I’m relatively a new “developer” and i haven’t any experience.
I want to hold objects, use them, and I want to have an inventory where i could combine 2 or more objects.
For example: I pick a glass of water and in the inventory i see a mini-description of the object and if i combine it with plants, i can craft a natural potion. Something like that i want.
if you are new you should probably start with some easier basic stuff than an inventory, an inventory system can get very complex very fast.
I want to make a game but some users recommended me try something easy and i though an inventory system was better, why is so complex?
What should i try then?
Inventory is reasonably easy as a GAME programming task, but it’s somewhat complex as a game PROGRAMMING task. If your challenge is the PROGRAMMING big, you need to start easy on that, before you can go on to GAME programming.
I would suggest you start with blueprints. Start with the YouTube videos for blueprint scripting – I think the first is something simple like making a door open.
Then, go to user interface. How to create a UMG User Widget, which will be the inventory drawing on the screen.
Then, you can start making icons for the things you can carry, and some kind of object for each item, and make the window on the screen show the list of items in your character which is the “inventory.”
(You will have to create that list for the character, too)
Then, you can go to ray casting to find elements under the mouse (the “puzzle” or “top down 3D” starter templates show how to do this) and test the picked object for whether it’s something that can be in inventory. Best is probably to define a blueprint interface that your object actor implements if it’s pick-uppable.
What is a UMG User Widget?
Link to a unreal umg tutorial: https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_O1gZalvQWYs8sc7RP_-8eSr3i/r4tltrLLVuQ/index.html
Let me show you a tool that you are going to have to use a lot when learning to program games:
Mastering this tool is the first step on the road towards greatness!
You have to think of 2 things:
What exactly does your inventory system need?
How do you want to manage the inventory (data structure-wise)?
Here’s a snapshot of the inventory System I built:
I have a Base class called “BaseItem” which provides basic Information of a single Item (multiple Items are stacked).
It has methodes like getName() getInventoryMesh() getActions() (ENUM :Equip, Use, Examine etc )
All Items implement a specific Interface (WeaponInterface, UtilityItemInterface,ExamineItemInterface) etc.
The Inventory itself is encapsulated in a Component, where it is an array of ItemStack-Structs.
The Struct itself is a reference to the Item and an integer with the amount.