the print i added should have worked if it was in the inventory but you’re right it might not be where i think it is. for context here’s the structure for the inventory item data:
this is partly why im so confused. i dont know what holds what or where my item is even stored during the gameplay because there’s just so. much. stuff.
At the top of the blueprint window yo have these icons:
Click the “Step to next node…” (right arrow icon) until you exit the function. Hopefully this should be close to where the item gets added to the inventory.
Ok so inside Add Item to Inventory the struct should break, setting the string as key and a copy of the struct as value. Can you share the bp for that?
Ok. This is the heart of the inventory. Everything is stored inside that map variable.
The inventory component also has some functions to check what it contains. This is the function you should use to check if something is in the inventory or not:
This functions should take a string or the struct as argument and should return either true or false. Its what should be used over the map variable a few posts back.
From the GetComponentByClass, drag from the output and add IsValid node (should have ? icon). From here also drag and look for IsItemAlreadyInInventory node.
An inventory interface could be more convenient but lets just get it working. Also looking back part of the issue is that there is no reference to the inventory component of the character.