add to array is not working with structures
I am trying to create an inventory system, been having a lot of struggles but finally got something structured but when testing my inventory system is not containing the item I am trying to add. For testing purposes I am just adding an item when pressing left shift. in the debug I can see all the variables going through the game play flow correctly however as soon as it enters the 'add' node for an array it doesn't update the array but also don't get any error messages.
if you are wondering, Inventory is an actor component, inventory slot is a structure with Item and quantity variables. Item is an Actor and ItemStick is a child actor of Item
When debugging, shows all variables are ok however after finishing all the default values on the side are the same.
asked Apr 26 '17 at 06:16 AM in Blueprint Scripting
1) In first pic I see, that you got 10 slots by default. Add node is used to add new slots so if you in construction script our begin play making 10 empty slots is better to set the items value by using set array element and not create new slots xD.
2) Let's talk about structure. Can you post a pic with the item definition type and the code when you call add item in the slot
answered Apr 26 '17 at 07:36 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here