[RESOLVED]Destroy actor from HUD

Hi there, I created an activable buton on my hud, and I want that when this buton is activated, I destroy an actor by clicking in it, I could make it work using the the event tick, nut the problem is with event tick I can not click whenever I want, it simply destroys all actors it touches, even the level bluprinet actor, I have an array of actors that I spawn and I want only to delete the actors from this array when I click, I’m already 2 days looking to try to fix it but I can’t make a simply delete button works, any help please

when you click the button, set bool destroy=true, then in your code for detecting what you destroy if destroy=true, then destroy actor, set destroy=false.

if thats no good, screenshots?

I’m having the problem to tell what to destroy, I tried many possible ways but none of them worked, I’m trying to tell the HUD blueprint that, when I click an actor class, it have to be destoyed, but I don’t know how to tell it, but when I didi it with event tick, it worked

you need to find the correct object first, save a reference in a variable, when you click the button, destroy actor, but link to the variable.

you can use line traces etc for that if you need to select a specific actor by clicking on it.

can you show me some examples? please.

Hi, I got help on this question

It helped me go through this problem another way! thanks for your attetion!