Jump to content
  • Advertisement
Sign in to follow this  
Pedro Alves

inventory problem

This topic is 494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

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]

 

 

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

Share this post


Link to post
Share on other sites

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

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

Edited by Scouting Ninja

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!