How do I exchange Information between my Inventory slots and my crafting widget?

Hey Developers!

Just wondering how I would go about Exchanging this information between my Inventory Slots Quantity and My Crafting Widget Window. At the moment my crafting Window is registering the correct Items that are present in the Inventory. As shown in this picture below.

Which is great but now I am wanting this Crafting Widget to register how many resources are within these Inventory Slots. I have been following a tutorial which has been amazing but they have connected it this way as shown below

Which works in there case but in my case I am using Local Slots as an Array within my Inventory set up so therefore I cannot Break Inventory Slot through my find Items they way this tutorial has. Any suggestions as to how I extract this information from my Inventory Slot which does Quantity/Amount within it but I cant access it through the Slots as an Array.


Any help would be greatly appreciated!

Did you use your inventory blueprint component in your player controller ?

You should be able to access your inventory function via a get player controller (with cast or interface) from your craft widget.

1 Like

I have added The Blueprint Component Interface for my inventory system and my BPI crafting component to my Third person character. This is how I added it as my inventory is displayed through my Main HUD widget.

Is that what you are referring to? Thanks again your like my Unreal Guardian Angel. Your border lining becoming an NPC in my game if we get through this one :slight_smile:

1 Like

From your widget craft menu, you can do something similar to this:

Am not sure how you setup your bp inventory component but if it has any interface function, use it instead of my casting and also you can use a get component by Interface for optimisation :innocent:

1 Like

Ok Ill have a look at that and see if it works tomorrow. Here is some shots of how my inventory is set up incase theres anything in there thats the cause






Anything I can Help you with :slight_smile: Need any meshes made in exchange for your help :slight_smile:

1 Like

Tell me if it work tomorrow :hugs:

Just a side note: it might be better to create your inventory in your player controller, let say your want to switch a character or if your character get destroyed, you won’t be able to call your inventory in that case. But in a player controller, you can call your inventory anywhere giving more flexibility :innocent:

Thanks for the proporsal, but i barely started my own game, so hard to find some free time :frowning_with_open_mouth:

1 Like

I’ve had a little play around to get it similar but It’s still not exchanging any numbers information. My initial problem was that my Find Items was a pure function so when I tried to connect it as you demonstrated I got this

Which I added to My CraftItems Construct, complied and saved and nothing changed. So then I tried it for my CraftResources Widget which contains the numbers and Icon needed to craft and that was not successful. I ended up with the same Issue. So then I changed “Find Items” to a non pure function and added it to construct of WDG_CraftItems and I got these errors due to the change in pure statis Im assuming.



So I connected them like this…



If I just added these two errors directly into the line as I’m CLEARLY still learning :slight_smile: It returned the same problem from what I can tell the Information about correct items being in the inventory is being exchanged but the numerical values within those Data tables are not maybe. So I tried the system you suggested with the WDG_Craftresources which has the TXT_Amount in the Widget display and tried to connect that but same thing. No Amounts are being exchanged or calculated. I can still pick up 1 stick and build something that requires 10. But when I build said item. The Inventory Resources are removed and the new Created Item is placed into the inventory.

I’m Trying to create a survival game and from what Ive read today your suggestion to put it in the player controller sounds great. Im right on the edge of understanding these complex systems so thank you for your patience its greatly appreciated!

Here the goal:

We will need to update left menu such that we compare RequiredAmount and InventoryAmount.

From your widget craft menu, you will need to move this:

To this one:

From your structure craft, you get it required ItemID and try to find the same ID in your inventory array. And finally their amount to be compared.

Here is what Those Breaks look like fully expanded. In WDG_CraftItem the ID is connected to set text.

Then in WDG_CraftItemResource when fully expanded I have ID available there as shown here…

So then I should move Find Items Pure Function into WDG_craftItemResources or create a variable from ID in the Break Inventory Item and then see if it is equal or greater than The craft resource amount? Sorry I’m trying to follow as best I can

This is the tutorial I am following where I am Stuck is at 32:00. What the guy has made is awesome hense why I’m so keen to finish it. All his stuff is great

Yes something similar from what he did at 32:16

Inside your widget craft resource, get player character > get inventory … compare amount btw inventory and resourse craft. Then some condition for making the number red or gray + disable/enable button.

From what he did, he passed the inventory component reference inside a custom event which is somewhat similar, goal is just getting the inventory of the player.

I’ve tried this but its the same thing. I tried to get player character and Inventory but in this widget the inventory isnt a variable so I had to add it. But then to get to the inventory slot which has the Quantity information I still need to break the inventory slot to see that Pin of “Quantity”




Im sorry, I just cant figure out what your trying to convey. The condition for numbers to be red/White is already created within the WDG_CraftItemResource. I feel like all my problems come from within the “Get Missing Resources for Item” my pin from “Find Items” is an array not a single Pin… Therefore shouldnt I have to do a break for each loop or something to be able to break Inventory slot from the array, then plug that in the same as he has? Something like this…


But that makes everything White and able to be crafted. Im really sorry for this this part is just really confusing for me. Any chance your keen to do private paid tutorial to sort this out?

To get the inventory system exact reference, you need to do GetPlayerCharacter>CastTo your character>get BPC_Inventory

Yes you need to loop your inventory slot, that where you array contain all your current items.

I wouldn’t have the time to offer paid tuto sadly x.x

You can do it, take your time. I suggest making your own inventory system after succeeding this one, this will help you adapt it to yours and if you ever re-encounter something similar for a unique gameplay not found online, you know what to do. :innocent:

Is this what you mean… It has kind of worked as in it wont allow me to craft campfire if I pick up 5 wood but it also doesn’t work cause now if inventory is empty I can craft things. Sorry again and thanks for your patience.




Yeah I will definitely attempt that once I can resolve this problem and get it working.

It will better to use only one event Event Construct and merge everything into one.

And also move the green box at the end since we are changing the boolean value IsMissing first before setting the button/text appearance.

The branch pin should be if True => IsMissing to false(unchecked) and branch False => IsMissing to true(checked)

1 Like

Thanks I’ll have another look took a few days away from it so I didn’t break anything :slight_smile: will let you know I go

1 Like