Dynamic inventory system
Hi. I'm trying to create a dynamic inventory system but I'm not doing something right. I've created an int array and I have for example (Gun - id 1 and Key - 2). After I collect the Key for example I add the id 2 in the first index of the array. I think I've added this right to the array ( I'm new to BPs ) The problem is when I'm opening the inventory. I don't know how to stop adding the same item into my inventory. I'm looping through the array and if I got the Key, it's added twice into my inv.
Collecting the item
Geting the items into my inventory
This is how it looks like. I know where the error is ( I loop each time the same array and when true is adding again the key ) but I don't know how to pass the index which has already been added. Thank you!
asked Jan 15 '19 at 02:16 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here