Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

inventory problem

4: Adsense
  • You cannot reply to this topic
7 replies to this topic

#1 Landi20   Members   

249
Like
0Likes
Like

Posted 19 May 2017 - 12:07 PM

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

https://www.youtube.com/watch?v=UCV5YWUobxo&t=15s

i using unreal engine 4

i put in rar file becouse is multiples files

what i doing wrong

 

 

 

 

 
 

Attached Thumbnails

  • ddd.png
  • Starting_inventory.png
  • Sem Título.png
  • f.png

Attached Files

  • Attached File  RPG.rar   257.9KB   10 downloads


#2 newtechnology   Members   

1811
Like
0Likes
Like

Posted 19 May 2017 - 03:27 PM

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



#3 Landi20   Members   

249
Like
0Likes
Like

Posted 19 May 2017 - 04:23 PM

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

Unreal_Action_RPG_Inventory_System.jpg

but this is my results

ry.jpg

ddd.jpg

 

 



#4 Mike2343   Members   

1168
Like
0Likes
Like

Posted 20 May 2017 - 01:12 PM

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.



#5 Landi20   Members   

249
Like
0Likes
Like

Posted 20 May 2017 - 03:50 PM

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


Edited by Landi20, 20 May 2017 - 03:52 PM.


#6 Scouting Ninja   Members   

3741
Like
0Likes
Like

Posted 20 May 2017 - 04:36 PM

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



#7 Landi20   Members   

249
Like
0Likes
Like

Posted 20 May 2017 - 05:43 PM

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



#8 Scouting Ninja   Members   

3741
Like
0Likes
Like

Posted 20 May 2017 - 07:52 PM

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, 20 May 2017 - 07:54 PM.