How to have your game check for actors in a scene before progressing to the next scene?

I am currently making a game where the actors (think good things) spawn in from the top of the screen, stop in the middle for you to click them, and are deleted when clicked. However, there are different actors (think bad things) that spawn in varying numbers and replace the good actor.

The bad things make it so when tapped, you lose the game. What we want to do is to have the game check for if all of the good things have been clicked, leaving no more good actors on the scene (still leaving the bad things), and if so, switch the scene to the next one (meaning all the good things have been destroyed). However, since the bad things spawn in varying numbers, we can't have a basic code like: "when x amount of good things are destroyed, change the scene."

I was wondering if anyone on here had any idea for a possible solution? Thank you. :)

Best Answer

Sign In or Register to comment.