inventory slots

how load correctly every item into slot
what i doing wrong
this is my blueprint
and i like put like this
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 ) :

The normal one :

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
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

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