SpawnActor/Destroy Glitch

Hello, I’m fairly new to Unreal Engine and looking for advice.

I’ve been following a free programming tutorial from 2023 and have hit hiccups once in a while. Currently I’ve got a 3rd person character which can “interact” using Action Mapping, the interaction in question is Destroying an actor that I made from the guide called BP_Pickup. It uses event overlap plus the interact key “F” in this case to Destroy said actor. The actor BP_Pickup is a custom golden cube made within the engine.

However there are a few strange issues. Firstly I have three BP_Pickup’s in editor mode “BP_Pickup, BP_Pickup2, and BP_Pickup3” when I press the green play button one more is supposed to spawn from a TargetPoint Instance. Running the session spawns a second BP_Pickup 2 with gold text to spawn, and another 4th cube labeled “BP_Pickup4”. And when going to destroy the actors’ it sometimes doesn’t work, or destroying one cube destroys two in separate locations at once.

To summarize the issues I’m having are duplication of a previous actor on spawn, and a destroy actor working intermittently.

Thanks for any response.

1 Like

Best to show the code?

I’m wondering about input consumption, for the F key, for example

If its on, all BPs will respond, otherwise only the the first one placed in the level.

I’m not familiar with input consumption, however I will look into it later today.

Here are the screenshots of my Blueprint “Code” and of the issues in action.

Spawning Existing Actor “BP_Pickup” at TargetPoint (Code in BP_Character not BP_Pickup).

Will try more screenshots today, the forum is only letting me post one screenshot at a time due to being a new user.

Just checked consume input is checked, though this is only visible when I create the same F blueprint that you have. Normally I don’t have that blueprint in my code. So I have no idea whether this is checked without said blueprint. I’ve been relying on InputAction created via the project settings. Thus I had made an InputAction Interact bound to F.

The project settings do indicate that the action and axis mappings are depreciated, which I haven’t figured out yet. As this isn’t mentioned mentioned anywhere in the 11 hour tutorial that I’m following, making it possibly outdated.

This is another section of my code relating to the interact and overlap functions for “picking up”/destroying the actor.

1 Like

I think you have the same options on the interact key