okay so i am not new to unreal engine, however i am new to scroll boxes and inventory setups, now i have researched different types of possible inventories that i can make and so far the only 2 i can really find tutorials and info on are:
an inventory system using child blueprints and then as you pick up an item it is added to a uniform grid and is given an ID number and this makes for a very basic inventory, however its not what i want.
an inventory system using one pickup item that has multiple meshes and multiple ID’s so that when you set the ID of the item it will then change the mesh that it is previewing, however with this setup all the coding for each item will end up being done in the same blueprint which is also not what i want…
So what i did was that i made a base item and created multiple children, these children break up into categories such as weapons, food or armor and then they get more child blueprints so that each interactable item has its own blueprint, this allows me to give each individual item its own unique coding, however i dont know how to give each item its own ID so that the scroll box can pickup the difference between them and also i have tried using data tables but they dont really help, so i would like to know if its possible to make an inventory using a scroll box and child blueprints and if it is how would i go about doing it?
thanks for the support.
Hello. hum, for your inventory you can use the data table. And I dont know if its the best option but in my case I only have One actor BP who drive all my inventory Item. You can give them everything you want on spawn using the data table. But first of all. To start learning something you can follow those video from epic. Here I know its only a 5 item inventory but you have to learn the basic stuff first. After a couple of tutorial you would be good enough to create your own inventory system. like I did. I’m sorry for not helping you much then this but in my opinion you wont learn if we tell you what to do. So keep it up. follow the epic video and you’ll be good to go.
To assign an unique ID, you can always call NewGuid. Alternatively, you can create in Game Instance class an integer variable ItemID, and a function that will return ItemID++.
When you add items into scroll box, you just add a child to the list. So, each child is a widget of its own. You can also save there (in child widget) an actor. When you click on a that widget, you will get that event and you can do drag’n’drop or place it into stash, or equip, or use it, etc. So technically, you do not even need ItemID.
Actors that are in your inventory - you can make them invisible and attach to the player. You can keep their references in a simple array. If you use slots for inventory items, then it is also some type of array. that can be implemented in a map: slotid - actor.
Thanks dude for the help, listen maybe i should have been clearer in my question but i actually already have an inventory and i have already coded everything that i mentioned its just that i was having an ID problem but then thanks to you and the other guy i was able to fix my inventory problem and now it works so thank you
no problem. I’m working on advanced inventory system myself that is a mix of just like in Diablo3 with elements of PUBG’s. I used to use unique SlotID (global integer) to store items in the 6x10 inventory slots, but few days ago I redesigned that part of the system, where I do not need anymore SlotID. My system is driven by mysql database and C# GUI frontend to set up/tweak items’ properties in design time, then I export that data into CSV to Unreal. It is pretty cool
NICE! it sounds very interesting, i hope that i can see it when its done…i myself am making a survival, crafting, action, base building game and so i was wanting to make an inventory that looks good and fits the description that i made in my first question but i am trying to make a skyrim-like inventory where you can rotate your inventory item around in a set space so that you can view what you have in your inventory