Problem with destroying actors

Hello, it’s me again and i’ve got a question about destroying actors.
I’ve got two types of actors green and orange, and when the all of them will be destroyed the game ends.

But when in arrays is wrote 0, he game never ends.
When i write 1 in both arrays is something like that:
a) When i destroy first all green, and then all orange all is allright and game ends.
b) When i destroy ONE ( there are two) green actor, and then destroy all orange, the game ends, with one still remaining green actor.
Any idea what is wrong? Thanks for Your patient again! :slight_smile:

So level1 is the level you want to open when the game ends aka when all orange and all green are destroyed?

Right now your setup so that if there is more than 1 green it wont do anything and if theres 0 green it will only load the level if theres 0 orange

I would suggest first making each event into its own (make Destroy orange plug into GetAllActorsOfClass(Orange) and get rid of the false->GetGetAllActorsOfClass(Orange) then plug GetAllActorsOfClass(Green) → false → into open level node.

You just need to re-arrange your nodes.

You could also do some while or foreach or for loops to do checks.

Let me know if that reorganization helps!

Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going as well as keeping AnswerHub clean so that it gets removed from the “unanswered questions” category.