Sign in to follow this  

inventory problem

Recommended Posts

i can´t add a item correctly to my inventory

the result is like this image ddd.png

and i want this result this image Starting_inventory.png

i use this tutorial to make the inventory

i using unreal engine 4

i put in rar file becouse is multiples files

what i doing wrong






Share this post

Link to post
Share on other sites

i try pick up a item add to slot like this images


but this is my results





Share this post

Link to post
Share on other sites

Great.  You have given us nothing but pictures.  What code are you using?  What have you done?  All I know is you have pictures and you're using UE4.  Oh and a .rar file I and most smart people will never open.  Dropbox, github it or something safe.

Share this post

Link to post
Share on other sites

The only think I can see wrong from you images is that you are not using the same style art, every thing else works as expected.

The tutorial you are following, like so many Youtube tutorials for Unreal, uses long inconvenient ways to do things.


For the proper inventory tutorial follow this one:

Share this post

Link to post
Share on other sites

thanks the problem i want put i item in the slot of my inventory like the tutorial you give -me  but using c++

That tutorial is how you use C++ to make the inventory, if by C++ you mean Unreal's blueprint like you where using.

what is doing is create a slot every time i pick up a item

Yes: in your second image you have a array that holds the items, this list was in the character blueprint, you cast it to this blueprint.
Then you used a For loop to Create Widget for every item in the inventory array.

"For every item in inventory draw a widget"
The inventory array is your real inventory, as the computer understands it; the images are imaginary they don't have any thing to do with how the inventory works.
If you printed the inventory array it would look something like this: (Item0) One item in the array will draw one image.
So to have slots you first need to use the For loop to Create Widget or Draw Texture Simple for the empty slots.
Here is a tutorial
Using this image from the tutorial:

Here you see he uses a Lives variable to give a amount of times the image should be drawn. You will do the same:

So you will use a for loop with a variable maybe it's called MaxInvintorySize and use that to draw the empty slots first.

Edited by Scouting Ninja

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this