Download

inventory slots

how load correctly every item into slot
what i doing wrong
this is my blueprint
3a61de94c9ef5a63260fdc6d3e93418e9f25e6e1.png
2b1c7710f70701198ffaac1b19aa19357ab9f941.png
and i like put like this
88a2955f292d055b17ad252a5153a0c59992db5b.png
and i have this resultry.jpg

Because there’s no owner on the “create widget” node? Even if it’s not , it should have one or it’d get messed up with more than 1 player. Right click on the event graph and search for “get owning player” and plug it there, make sure that you set an owner when creating the widget aswell. Also, how does the inventory slot looks?

Are you sure the inventory struct isn’t null when the script is run? Make sure it isn’t , you can check that by printing the “isvalid” for the actor reference on the struct. If it’s null when you run the script the result will be what you have there and i’d be 90% sure this is the problem.

Also, i may be wrong, but i don’t think you should add a new widget for your items. The inventory should have several slots that when you pick an item it gets updated based on whatever method you decided to implement.
The way you are doing seems like every time you’d add a a new item it’ll wipe everything and re-add again plus a new item, even tough some items were already there. It may not do much difference on the final product, because a small inventory would be recreated really fast, but it’s an awfull programming method for several cases(i really can’t think one that it should be good, but i’m a new programmer so i’m probably wrong).

If you wan’t inventory pages i’d recommend you to create a master page widget that holds several inventory slots and when the amount of items in this page exceeds after adding a new item(or a bag, whatever you want) you create a new widget of the master page type and add to a widget switcher(or whatever fits your style better) that changes on a button click.

I’m pretty sure i left a lot of things to say but if you have any doubts Wes Bunn from epic games have 2 excellent tutorial series on inventory , 1 is drag and dropable and the other is not.

The one with drag and drop (there’s some bugs that he fixes on the last episode, so don’t worry about it when you see the first 2 ones ) :
https://www.youtube.com/watch?v=wyC5vl64V9k&t=2554s

The normal one :
https://www.youtube.com/watch?v=r4tltrLLVuQ&list=PLZlv_N0_O1gZalvQWYs8sc7RP_-8eSr3i

Those 2 things helped me alot.

The slot inventory system is pretty complex but I do have it in my game… Unfortunately I couldn’t get the inventory slot system to fully function on my end. It wouldn’t change the slot item over into the update preview window…It is supposed to change the weapons, armor, shields. and other objects on your character after you pick up the items. But the setup I had was complex involving data structs and enums and alot of blueprint wiring up for all of the slots it also uses several Interfaces and has alot of functions.

i forget the say i use c++ and blueprints to make my game
to make the inventory and craft system i use this tutorial
https://www.youtube.com/watch?v=UCV5YWUobxo&t=15s
i think i post in wrong section

I’m not sure, but you are calling the Load Inventory Items function on the construct of the widget, but are you sure that the inventory struct on the for each loop isn’t null when calling the event?

i gonna put my code project in dropbox

only slot inventory em i pickup a item
like this image
ddd.jpg

I cant put work correctly

i forget the put a blueprint
i can´t put work correctly
i new programing in c++ and using unreal engine
i think the problem function add item to inventory by id

52c4a00d02db241221236b71c454fa48cbe690f8.png