How to make a game similar to space invaders

Specifically, how to make the enemies swoop down every time they near the edge of the map, without disappearing. Also, how to make the enemies shoot without damaging the line of enemies below them? For cover, is there a way to decrease the cover every time it gets fired upon? Thanks in advance.

I spent about 2 hours in this. It was a big project, and I didn’t feel like putting in all the effort. http://www.flowlab.io/game/play/72812