Hi, could anyone help me with this tutorial? Something simple, but as I’m a beginner I can’t do it, in this part of the tutorial it teaches you how to pick up objects at the same time as placing an inventory grid, but it picks up the objects automatically.
What I want is to get the items by pressing the “E key”. Just that, if you could send me prints I would be grateful
I also have the item’s sphere, in this image only the sphere appears because it is the parent blueprint and the meshes only appear in the children, so that said, what would be the event to call the item? and how do I remove it from the automatic?
so basically you want to move everything from overlap begin/end to custom events Pickup/Drop and then call those custom events when you want, which in this case is the ‘E’ key.
but remember to do the sphere trace to confirm you’re in range and which item to get
there is a spheretrace node, center it on the character and if your collision is correct it’ll return all items in the area. from there you can call functions on those items like tryadditem
This should work for you, assuming this code is run on your player character/pawn.
You don’t need both the [Input Action Interact] and the [E Key] events, I just had them both as an example.
Likewise I highlighted the Object Type on a component of this actor to show what you want to look for on the Items you’re picking up.
I did it, I made an interaction interface system with some things and added the “event on interact” instead of overlap and it worked normally as I expected
thanks