So I have and actor named “Interactable_Base” then I have a child of that actor name “Pickup_Base” finally I have a child of that named “Silver_Currency”
Interactable_Base> Pickup_Base > Silver_Currency
Interactable_Base: Displays the pickup icon when the player is overlapping and registers the button press. Then it fires the ‘WasInteractedWith’ event.
Pickup_Base: Listens for the ‘DidInteract’ event on the parent, gives the appropriate item to the player, then destroys self.
Silver_Currency: This is where the mesh is stored and the the appropriate item is selected from an enum.
When I place just one ‘Silver_Currency’ everything works fine.
When I have multiple placed, its as if something is acting like a static. I am able to pick up one of them, but I have to keep trying until I find that one, then the only one I get is changed to a different one.
I’ve tried multiple debugging techniques but I still cant figure out what the problem is. I’m thinking its probably my lack of understanding on how hierarchies work in Unreal.
Here is what I believe the problem area of the blueprint has to be. I setup a set for a bool at the end of the “set visibility” blocks and could see it being changed to true, but when it attempted to check it during the button press it would be false.
i would venture to say that the issue you are having is due to how your handling interaction with the item. you say that you can only pick up one certain instance of the actor, is it the last or first actor to be placed perchance?
basically the issue is that all instances of the pickup (im using pickup to apply to the actor be it silver coin or whatever else) are trying to use the input event at the same time, they all cannot use the input though so the one with priority is the one that gets and uses the input. theres two simple options that you can try to resolve the issue: first you can select the input action event and in the details panel uncheck consume input, were it not for your vis check this would result in every pickup being picked up at once, your vis check makes it so one will be affected like the next option. option two is to modify if the pickup can use input based on a condition. below is a example of this method. in the example below we have input disabled on the pickup by default, then on begin overlap with a character we enable input which would allow you to interact with the pickup, on end overlap we set input back to disabled. i used Q as the input event the same as your input action.