If the above is not destroying an object, there’s something else set up incorrectly that we’re not seeing here.
But if you want the 2nd button remove to remove what the first buttons spawned, this will need to be different. There’s no need to copy paste all that script. Use the method I originally suggested.
Otherwise you’ll get lost in blueprint spaghetti after 5 buttons… not to mention 100 buttons.
But if i add it to one special button (named Clear) it will work for one clear, so it is problem that another button dont delete previous setup. Maybe i can do array of all BP and add to every button action that always delete all of them, do you have any idea?
give it a meaningful name, and then you can call it like so:
This way you can have a reusable piece of script so you do not need to copy and paste the same nodes all the time.
But if you really want a hundred buttons, a very different approach is needed. There surely is some kind of logic that decides what’s what. But again, the above should work for something quick & easy.
I tried a first method, its doing the same thing, so the problem must be maybe in DestroyActor and the connection i have no idea now both doing the same. I dont want to use separeted button to clear.
It seems that the first approach now working well man, sorry i havent connect one of actor, u saved me lot of hours, thank you so much. You are the best