Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Retrieve values of specific item inside an Array

Below is my inventory system that I followed from a tutorial. How do I add both item values from different indexes in my inventory? I want to be able to print the 'X' value as 12, instead of 'X' value as '10' and '2' separately, so I can get the exact total amount of 'X' item inside my inventory.

alt text

Can anyone provide me some insights on this? Thanks.

Product Version: UE 4.19
pic.png (137.9 kB)
more ▼

asked Jun 02 '18 at 06:26 PM in Blueprint Scripting

avatar image

1 2 8

avatar image Shadowriver Jun 02 '18 at 09:40 PM

Which tutorial? you need to find part of blueprint that separates items like that end edit it so it support more then 10 items in boxes.

avatar image miramaslow Jun 02 '18 at 11:55 PM

I followed this tutorial link text

I managed to retrieved the amount of items like above pic, but it's only retrieve the item amount on the selected index. alt text For instance, the pic below will prints out 12 because the current value inside the first slot/index that is being used. alt text However, it won't prints out total value of 18 in below pic because current index that is being used is on the 2nd slot/index. alt text I would like to retrieve total amount of item from every index available inside the array. Any ideas?

pic1.png (269.4 kB)
pic2.png (316.6 kB)
bp.png (181.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Alright, I finally managed to solved this. Hope this helps for anyone who encounter the same problem alt text

I ended up creating new function and just use it whenever necessary, in my case I'm calling it inside the function where new items are added into the inventory.

bp.png (197.6 kB)
more ▼

answered Jul 31 '18 at 11:09 AM

avatar image

1 2 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question