I’m trying to destroy an actor when I press “E” and while the player is overlapping a collision box but I can’t get it to work. I’ve tried to many tutorials and I’m stumped. The overlapping works but pressing “E” Still does nothing.
I’m currently on 4.27, any help is greatly appreciated. Thanks
I’ve done this with UE5 and there are no issues.
You need to provide the link of the character to be destroyed in the destroy target part.
Also you don’t need to use visibility for a character that will be destroyed anyway.
You can try it like in the video I prepared.
Nope, none of the blueprints on E trigger. I’m guessing it’s because I’ve put it in the BP of the item being destroyed and not the player? Somehow need it to trigger when the player does it
Hey! I think this video will do the trick
I didn’t work according to your code, but I used the same system.
You can use the actor’s own blueprint system you want to destroy.
Thank you for the video, I’ve just tried it out and it hasn’t worked for me. It doesn’t seem to pick up any inputs on the BP that the character is pressing.
The object I’m trying to destroy is a Character ClassBP so that might be something to do with it?
Still doesn’t seem to work when using a CharacterBP. I’ve made a version using the ActorBP and it works. Just trying to figure out if that’ll be okay since I wanted them to be an enemy AI
Ah sorry that’s my bad for not realising it soon. I might have to find another way to have the enemies destroyed like that then, since ActorBP can’t have movement from what I can see
Yeah so the plan was to have a collision box on the back of some enemies so that when the player walked up and entered the collision box and pressed E, the enemy would be destroyed. If done the exact same code that you’ve suggested on the an Actor and it works perfectly, but doesn’t work on the enemy
I was just about to google this, and remembered: You can’t enable input on AI, I don’t think.
It will work if you make a custom event in the AI, and call that instead of trying to get keyboard input working. It’s because your keyboard input is already on your player.