Download

Destroy multiple actors by pressing a button

Hi,

I’m making a simple game to learn UE4 blueprints and I have a level that depending on an intreger variable will span an actor ( blueprint with static mesh ). There are 50 actors ( blueprints ) in total and at the start 5 random actors will be spawned. There is a function that will run 5 loop 5 times.
I want to press a button and irelevand of whitch 5 actors are spawnd to destroy them.
How can I achive this.

Thank you in advance

@Bogdan00001 When you spawn the actors, give them a tag. Then later, you can find them again with GetAllActorsWithTag and destory them.

Thank you very much. I searched Google so much

by pressing a buton i spawn an actor as long the buton is pressed but how do i make it disappear as sonn i release the buton ???