Trigger pickup and destroy blueprint actor

Hi everyone,

I am using a Xbox One controller to run my multiplayer game. Basically what I want to happen is have pickup items (in this case gems) that when a player enters a trigger box surrounding the object that an instruction widget (“Press X to pick up”) appears and when I exit the box the widget disappears. I can get this to work fine.

Then when I am the trigger with the instruction active I want to press the X button to add 10 points to my total and destroy the trigger and the object. Again I can get this to work to a point - Destroy Actor does not work and when I put Destroy Component the gem disappears but if I walk through the same spot the collision of the Gem is still there.

I have created individual blueprints for the pickup but I don’t want to do this for every individual possible pickup. If I ignore the trigger box and widget and have the player ‘run over’ the gem It works fine. What do I need to do to get this all to fit?

Whats in the collect emerald function?
When Destroying a component, the actor still exists and ticks and overlaps etc

The Collect Emerald function is on the Player Blueprint. Basically it just adds the ‘X - Pick Up’ text on the Widget (sets its visibility). Ideally I don’t want to destroy a component. I want to destroy the whole actor but for some reason when I attach the Destroy Actor node nothing happens… I can only get the emerald to disappear with component

Add “destroy actor” but dont set a target, it should destroy itself.

failling that, please send a screenshot of how you implemented the destroy actor.

I have tried nearly everything. At the moment after you press X it adds the score and a Boolean called ‘Picked Up Emerald’ is set to true on the player BP. Then on the BP_Emerald I call event tick - when Picked Up Emerald is true it calls the custom Destroy Function. This still won’t let me destroy actor - nothing happens, but if I destroy component (emerald) everything is ok except the collision is still there if I run over the same spot.

I worry that to do this for every type of gem is going to result in huge blueprints - surely there has to be an easy way to create a trigger that gives you instructions (text) and allows you to collect the item, add score and destroy the item??

Thank you for your efforts - I just feel like I am doing it the wrong way as I am sure there is a simpler technique.

On your overlap event, just cast to your Player and call your function collect Emerald and then Destroy Actor within this overlap event. You need not to use Tick Event . Destroy the Actor on overlap event itself.

I understand what you are trying to say however the Collect Emerald function simply turns on the Widget to say we can pick up the item. If I destroy the Actor there instead of Tick Event it will automatically pick up the item rather than allowing the player to press a button to pick up.

Why did you create your own “Destroy actor” custom function(the one that only removes the component)??? just use the built in destroy actor function. get rid of the custom “destroyactor” event and test again with the built in function.

You should destroy actor on pressing the button to get pickup. e.g if your pickup works on Pressing E button, then you should destroy your pickup Blueprint on that event (By getting reference to your pickup BP in your player BP). You need not to do it in tick event of your pickup blueprint.
You are currently destroying only your Emerald component and not the trigger box around it.