Hi! Sorry I took so long to get back to this.
Your setup sounds like something that could work, even though it may not be the easiest way to achieve what you want. I myself would only create one enemy actor, and clone that one actor across all levels. At the beginning of each level I'd set the enemy_units variable equal to the amount of enemies in that level, so that when that amount of enemies is destroyed, the game knows that it's time to move on to the next level.
But let's try to work on what you have now. First, one question. How have you defined your enemy_units variable? Is it a Global Integer variable? That's what I'd assume.
Also, notice that you can't add events clone specifically. What that means is that when you say:
ckn087 wrote:"I made the create actor: enemy_units = 2; on enemy 2.1"
You are misleading yourself. That code is not added only for enemy2.1, but also for enemy2.0 - all clones of the enemy2 actor. Clones always share the same events. Within those events it is possible to do some clone-specific coding by using cloneindex or clonename to distinguish between different clones.
Now, seeing your .ged project would really help me to help you, because that way I could see the whole picture of what you have done, and find what is causing the trouble. But because at this moment I don't have that, I'll try to work based on what you've said.
Are you using the same enemy_units variable for the first level? If you are, are you also setting the variable to some value at the create actor event of the enemy1 actor? If you are, then there's your problem. Let's analyze what happens when your game is run.
I'm assuming all your enemy1 and enemy2 actors get created at the moment when the game starts. So, when game starts all enemy1 and enemy2 actors execute their Create Actor event. All clones of enemy1 set the enemy_units variable to the amount of enemies on the first level, and all enemy2 clones set the variable to the amount of enemies on the second level. Now, the actual value of the variable depends on what code gets executed last. And most likely that is the last enemy2 clone. So now, the variable would be holding the value 2. Now, I assume that your first level has 2 enemies, right? Because if it had less, your game would have never moved to the second level with this setup, and instead of asking your current question, you'd be asking why your game does not continue to the second level. And if it had more, you'd be asking why your game goes to the second level too early.
If my guess on how you've built your system is correct, then it will be an easy one to fix. However, I won't now go into details about if before being sure, that I'm on the right track. Because if your setup is different to what I think it is, the solution could just make everything more broken. So, can you please tell me if my assumptions are correct or not, so I can continue helping you? Alternatively, you can also zip your .ged file with the data folder and send it to me, so I can have a look at it and then help you find the solution to your problem.