Hello my friend,
Well, i will try to help, because in programming there are a lot of ways on doing the same thing.
First of all, i already do this on my game (and there is no need to use variables, except the state and activated), but just with little differences.
Think this way:
1) Place 10 enemies in your map, then place a "trigger" entity, can be anything, try a box (i.e) and name it as "triggerbox", place it on a non visible area of your map. Set on it properties always active and set it`s "strenght" to 0.
2) On this trigger box you assign this main script:
:activated=1:incstate=1,activated=0
:state=10:activateifused=1
3) On the field ifused of each one of the first 10 enemies, you put the name "triggerbox", and you select for the destroy script of those first 10 enemies the script "destroyandactivate.fpi", or simply put this final statement on the destroy script of those first 10 enemies:
activateifused=1
4) So each enemy of those first 10 that you kill, will "activate" the trigger box, and each time the triggerbox is activated, it will increase one number in the state variable, and return the activate variable to zero (reset) to be able to be set to 1 again, and again (10 times).
So when the state variable of the triggerbox reaches 10, it means that the first 10 enemies were killed.
5) And simply on the ifused field of the triggerbox, you put the name of the next 10 enemies. So you must name them all the same name, like "secondary_enemy", and on their properties you just set "spawn at start = NO" and "spawn after delay = YES". Voila!
It will work perfectly, like you want.
Go have a
Goldenye 007 N64