x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Editing Inventory Struct Variable

Currently working on an inventory system that is based off of the official UMG tutorial and have come to a bit of a problem implementing stack ability of items in the players inventory. Currently when the player picks up an item that they already have in their inventory I hold the stacking count in a variable, remove the original from the inventory array then add the item back into the players inventory with the newly adopted stacking count variable. Now this works fine but I imagine there is a better way to do it. The problem comes when using a stacked item in the inventory I can't reduce the stack amount.

alt text

Basically its just the set member in inventory struct part that doesn't work (as I think I'm not using the node properly). Is it even possible to edit a variable like this or would I have to do something similar to when I actually add the item (remove it from inventory then add it back again with the new value.)

Product Version: UE 4.7
Tags:
useblueprint.jpg (434.6 kB)
more ▼

asked Aug 11 '15 at 12:03 AM in Blueprint Scripting

avatar image

serpentine19
3 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

When dealing with arrays of structs you need to use Set Array Element. I know it was like this for 4.7.6, I'm hoping it is fixed or will be fixed soon.

Workaround example: alt text

more ▼

answered Aug 11 '15 at 01:00 AM

avatar image

IanLaBrie
611 21 8 35

(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