How do I make a collection system?

I haven’t used unreal engine 4 for a long time I am actually pretty new to it. So this is a disclaimer before you read any further if i don’t use the right terminology when I’m talking about something in the engine or whatever that’s why and i am sorry in advance. Anyways I was wondering how i would go about making a collecting system in unreal. I would prefer it to be similar to something like alien isolation or rust. When you go actually look at it a text appears on the screen that says press e to pick up name of item here. And then when you press e the item is collected. Whenever I look at tutorials on Youtube they always use a way that doesn’t work for me because i already have an inventory that i learned from this video. Adding Hunger System Food Pickups -#2 Creating A Survival Horror (Unreal Engine 4) - YouTube

Around 10:18 he shows how the item is collected and I just want to replace that with my method of collecting it. Creating Inventory Items - #14 Creating A Survival Horror (Unreal Engine 4) - YouTube That video shows how i learned to make the inventory i am using right now around 6:18 it starts. In other videos they have the pick up nodes in the third person/first person character and then have a reference to a main array or structure i think. But that doesn’t work the way i am doing it. If anyone could help me with this that would be great Thanks

Hi Hydra,

If you could summarize your current method such as adding, removing, etc…along with screenshots of the useful code, it would help. I know you provided youtube links but I personally don’t do well with jumping in the middle of videos.

Once we understand your inventory system you can also provide what you want to achieve and the current limitations you are facing. This will help us give suggestions that will possibly work for you.

Yep…screenshots!

Sorry I’m new to this. When I’m back home I will send some screenshots

from the sound of it your looking to do something like when you overlap the item / be in proximity to it then you want a message to appear above it that says what the item is and tells the player to hit the E key to pick it up. that parts pretty easy and is shown in the below picture. basically on begin overlap you make sure the overlap is the character, then you allow the item to accept input from the character, and finally you set the visibility on a text render which is the message to be displayed. the end overlap does basically the same thing but hides the text.

the more in depth part of actually adding items to your inventory depends on your current implementation. it appears that your links may be backwards. with the system show you would just need a input event for the e key which sets the variable for the slow item. it looked like in the video he was just using a different int to determine what item is what so that should be pretty simple to do. so basically on E input event → cast to your player → get the variable for slot x 0> set variable.

you could always adapt that system to an array to make things easier. then you could use a setup like the bottom-most part of the picture in which i add a item to an array.

hope that helps a bit

The only problem with this is that I wanted the text to only appear only when you look at the specific item

Easy fix, on begin overlap start a line trace with a timer or timeline or whatever you choose, and when it hits the object in question display the text. On end overlap stop the line trace.

I don’t really know how I would do that. How would it look in blueprints

Something like this. Obviously the “mesh” and overlap events would be specific to your situation but you can get the idea.