Just put a function like this:
then call it when the number of enemies is 0, with the level times two as the number of enemies to create
Function create_enemies(numb) For i=1 To numb en.enemy=New enemy en\enx=Rand(0,800) en\eny=Rand(0,600) en\img=CreateImage(9,9) en\hp=100 SetBuffer ImageBuffer(en\img) Color 255,100,100 Oval 0,0,8,8 MidHandle en\img SetBuffer BackBuffer() Next End Function
then call it when the number of enemies is 0, with the level times two as the number of enemies to create