inventory problem

Started by
6 comments, last by Scouting Ninja 6 years, 11 months ago

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


Hello

Advertisement

Could you upload the images correctly and ask more precisely? Right now I can't understand what you're trying to achieve.

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

[attachment=35948:Unreal_Action_RPG_Inventory_System.jpg]

but this is my results

[attachment=35950:ry.jpg]

[attachment=35951:ddd.jpg]

Hello

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.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

yes i using unreal engine the code

i put in attanchemt but i gonna put a link to dropbox

the problem i can´t put my item add correctly to my inventory

https://www.dropbox.com/sh/7lk517mtun6zceh/AAAnZ9yrHhgy5Z_sWb9lWHFra?dl=0

Hello

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: https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_O1gZalvQWYs8sc7RP_-8eSr3i/r4tltrLLVuQ/index.html

ok

thanks the problem i want put i item in the slot of my inventory

like the tutorial you give -me but using c++

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

Hello

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 http://romeroblueprints.blogspot.co.za/2014/10/arrays-and-for-loops-in-blueprints.html
Using this image from the tutorial:
bp23j.png

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.

This topic is closed to new replies.

Advertisement