Select Node with Set Array Element


Hello everyone,

I want to create a differently categorized inventory system in the style of Witcher 3. I want the item to be added to the inventory specific to that type based on the type of item received (like the Apple item being added to the Inventory_Foods array). So I select an inventory array based on item type using the select node. Then, I use the set array element node to ensure that it is added to the appropriate slot. But it doesn’t work. If I connect an inventory array directly without using the select node, it works, but it does not work with the select node.

Sorry for my bad English. Thanks for your replies.

Here’s the working code (when I’m not using the Select node).

I don’t think what you want to do is possible to do in blueprints alone, as far as I know all function outputs are by copy (except for objects), so your GetInventory function returns a copy of the array

I suppose you could instead use a macro (which is just a glorified subgraph) instead, and it should work

Also, you can use the Set Members In Struct function to set values directly to a struct reference (which you can get using the Get(a ref) node from the Array returned by the macro

1 Like

Thank you very much!

This is working now.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.