EDIT: Okay so I’ve narrowed it down to the fact that when the custom event “Pick Up Item” in the BP_InventoryComponent event graph is activated by casting from the BP_Item, the variables in S Item Structure don’t get changed.
If I trigger “Pick Up Item” from within the BP_InventoryComponent event graph (for instance, with an “E keypress”) all the variables update fine. I’ve checked and all the variables are set to be editable so not sure where to go from here?
Hello. To start off I’m VERY new to Unreal (and programming in general). I’m mostly following tutorials and trying to combine them just to start off. I’m currently trying to utilize two Unreal University tutorials. I started out with this tutorial on how to make a rudimentary inventory system. It worked fine, but I wanted to expand what all you could use the “interact” button for. Instead of using the “draw circle” method of finding pick-up-able items, I wanted to use the collision method from their interaction system tutorial.
So I have a custom event (Pick Up Item) being triggered by an interface interaction in the BP_Item event graph when “Q” is pressed. That custom event then sets off the “picking up the item and adding it to your inventory” part of the BP_InventoryComponent Event Graph. The problem is, when the player gets close to an item and uses the interact button, the item disappears off the ground, but does not appear in the inventory.
I also put in a simple “E keypress” trigger to replace the custom event just to test out if that worked, and it does! When I just use the “E keypress”, the item disappears off the ground and appears in the inventory. I can’t figure out why the “E” key makes everything in the BP_InventoryComponent Event Graph work fine, but the custom event won’t, especially when the custom event WILL destroy the item’s actor, which is the last node in the blueprint.
Any help would be much appreciated. And sorry my blueprints are messy–the tutorial’s were pretty messy too and I didn’t want to change the layout too much so I could still reference the videos easily.
It seems that my giant blueprint is getting compressed to the point you can’t read it. Here’s a link to it instead.