Use family and it's done with one event:
https://www.dropbox.com/s/4tjnro8xiy4j6 ... .capx?dl=0
If you use multiple layouts, you can put a text or an instance variable to set value to determine how much enemies you want on the level. So the event sheet remain the same for all layouts level.
Update version 1.3
Add laser spread at gameover
Add waving flag at winning
Add gate closure that show up when restarting
This subject had been asked many times with many example. I have mine:
If you need more reference for this subject, see the link to a topic:
mercuryus & Nagval333, Sure sharing development will help make the game better.
Oh almost forgot to upload new capx. Done.
Update version 1.2
Some graphical update with reveal fx.
Develop games in your browser. Powerful, performant & highly capable.
Roller Coaster Tycoon (original one) of course. Other than that simulation game I never enjoy them.
For Audio, once it loaded it stay there so the audio can be called anytime. The audio exist entire time no matter which layout being active.
The sample I gave simply advancing level with star achievement that recorded into local storage. I even didn't look at your capx. But hopefully give you some insight about array and local storage.
My example: https://dl.dropboxusercontent.com/u/659 ... eMenu.capx
The most realistic way is using boids algorithm. There is an example for that in forum. Alternatively simple hack would do the trick:
You can go that way or create your own level editor if you familiar enough with array & json to store data & load it with ajax.
Do you really need to smoothly scroll to get into next level for your game? Do so if you feel that will give good immersion to the gameplay. Another suggestion, use transition even each level were in different layouts so the player have a clue whether he/she were on different level.
Any video demonstration? Gif maybe?