The blueprint is a parent blueprint that serves as a base for all interactable objects.
It starts with a BP Interface that connects the main character BP with the logic for the attach actor to component (to pick up stuff)
To prevent the character from picking up two things that go to the same socket, I have made bools. The problem is that for some reason I can still pick up two objects that in theory I shouldn’t be able to do using the bools.
I have also tried to place the branch before the switch on object, but it is the same. Maybe the problem is with the data table? Or the blueprint structure?
Construction script of the general pickup object BP.
But then, if I place a branch before the interact message in the character BP, I won’t be able to access the BPI, which means that the other objects (utilities) that are attached to the other hand won’t be picked up neither.
Also, every time I pick up something with the right hand (melee and raged weapons) the bool updates (print string returns true). It’s just that when I get this variable in the branch it does not update.
You need to know if an object is ‘handed’ before picking it up. You can use the interface to do that. You can make an interface call that gives you back which hand ( if any ) the object is placed in.
That way, the player already knows if something is in their left hand ( for example ), walks up to an object, inspects it, uh-oh, also left-handed, don’t pick it up.