Hello, this might be really easy to solve but I can’t for the life of me figure it out. My AI spawner works and spawns enemies randomly. I’m able to destroy my AI spawner with my weapons and stop it from spawning. My problem is that when enemies spawn from the spawner, they don’t count as characters and are not needed to defeat to win. There are two enemies already that spawn on play and they are needed to destroy in order to win. Also the spawner is needed to be destroyed to win also. Right now to win, the player needs to destroy the two enemies are begin play and the AI spawner to win. How can I make it so whatever enemy spawns from the spawner, they are also needed to be destroyed to win?
Event begin play is going to trigger once when the blueprint loads. You’re probably going to want to use that tick to get actors of class to check if there are any alive over and over again until they’re all dead.
You could make an array with all the enemies references, and each time one dies, you remove it from the array. Then check if array size is 0, that means every enemy is dead. Also include your spawners in there