and it works just fine, but I’m having problems adding an external Chest/Container System, that basically is/should just be a secondary Inventory, but with the Itemdata stored in an Actor (this isn’t integrated since I wanted it to work first before I made it more complicated than it has to be for now, so its just a secondary Inventory). But it simply does not transfer the Data from the Main Inventory to the Secondary/Container Inventory, even though I’ve checked/changed the Code for the last 43 Hours (23 + 20 hours in the last 3 days) and it should just work fine…But it doesn’t, so I was wondering if someone tried something similiar and maybe there is something I’m missing.
Or if there is someone out there who has more experience with these Systems than I have, since I’ve started programming only 3 month ago (actually 2 Years ago, but just basic codes with Unity 5. My first try to make a game was a total disaster. 3 month ago i started with UE4 and BP scripting). If the integration would require me to implement a totally different Inventory System I probably would do it, even though I’d prefer not to change it, but I really need a Chest System.
I hope I did cover every detail about the problem, If not, I will try to edit it if you need more information about the Problem. I will probably check this page every 30 minutes for the rest of the Day, so you dont have to wait too long if I missed somthing. Also I’m using UE4.12, basically the latest official version(not beta). Also there are no Errorwarnings or anything similiar. There is literally no tutorial on an Inventory Chest System on the Internet, just showcasing finished Systems.Also if you know how to make a more efficient Inventory System with Chests “included” I would appreciate it, if you could show it, or just some basics for it to work. Sorry if this isn’t written very polite, English isn’t my Motherlanguage(Mother tongue?). Thank you very much.
Sorry for the mess and that i took so long. this should be the part that transfers the data even though the last pictures are commented as move thing inside inventory or move inside chest the same code works with the actionbar perfectly.!alt text
So could I actually delete ChestSlot and replace every reference to it with Inventory Slots and add an ArrayReference to it? And what type of reference should the ArrayReference be?Right now I’m trying to set it to a Name to get the arrayName it came from like InventoryButtons or ChestButtons.Or should i use another type? Sorry for the late comment, but as I mentioned I’m pretty new to programming, so it takes some time.
the array reference should be a reference to whatever array you are using to store the item’s data, which you want to transfer. the array can be full of custom structs that hold item data, or it can be names that can access data from a data table, or a struct that contains some data, and a name that accesses more data. it depends on how you want to store your items.
inventory slots could be given an enum that represents what PocketType it is. then you could make many pocket types, like boots, helmets, gloves, pants, healing items, quest items, ingredients, Chest, etc… and they could all use the same Inventory Slot code, but when you drop an item in a slot, you can check if the item’s PocketType matches the slot’s pocket type, before allowing the transaction. some of those pocket types can have special rules, like if the PocketType is Chest, you can allow any non quest item.
Actually I didn’t use enums, so I have no idea how to use them, but as far as I understood, the array reference can also be just a Name saved inside the ItemDrag, right? Because I’m using an Array of InventorySlots to make the InventoryButtons array and I replaced the Chestslots in the ChestArray with InventorySlots as well, so they share the same Slottype, and i deleted the Chestslots, I also added a Variable called Pocket to the InventorySlots and now I’m still trying to set this variable to ether Inventory or Chest when the drag is detected. Thats basically all I got for now…
Ah, ok so basically booleans are 1_bit and enums are like 8-bit, but what do you mean “explain what I changed”?
Did you like recreate the system? I actually didn’t want to cause you this much effort [( I’m not sure if this is said right) I didn’t want you to have this much work)].
Or did you mean you watch the tutorial on Inventoriesystems and “write down what you would change”(Tried to explain what I meant) Sorry for the bad expression.
Also how did you write the space? I’ve spaced the sentences out, but when I post them they just get back toghether.
Some comments are disappearing, beause your description about the way enums work isn’t there anymore. At first I thought you’ve deleted it, but my comment to it is also gone, and I’m sure I didn’t delete it… Is there a reason for it or is there something wrong?
sorry, i deleted that comment, because in it, i promised to go through that tutorial and find a solution, but then i looked at the length of the tutorial and got lazy. lately i have been trying to stay away from programming to focus on my environment art pipeline.
enums are like booleans, but instead of true or false, you can have up to 256 different states the variable can be in, so its useful for representing mutually exclusive choices, like (red, green, blue), or (north, south, west, east).
Ah, ok. I’m probably going to take a break from the chests, since they aren’t important until I’ll release the Game and if I should need storage I can alway expand the Inventory to have more slots.
Good Luck with your Environment Art Pipeline