sub Stage2
{
	DeleteMusic(BGM[2]);
if(PreLoad==0)
{
	CreateEnemyFromFile(csd~"stage2/LoadEnemy.txt",0,0,0,0,1);
}
if(StagePractice==true && PreLoad>=1)
{
	CreateEnemyFromFile(csd~"stage2/LoadEnemy.txt",0,0,0,0,1);
if(StagePhaseProgress<=2)
{
CompileEnemyFromFile(csd~"stage2/Stage2Enemy01.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy01a.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy01b.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy02.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy03.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy04.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy05.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy06.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy06a.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy07.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy08.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy09.txt");
CompileEnemyFromFile(csd~"stage2/Stage2Enemy10.txt");
}

if(StagePhaseProgress<=1)
{
CompileEnemyFromFile(csd~"stage2/LunaChild.txt");
CompileEnemyFromFile(csd~"stage2/BossEscape.txt");
}

CompileEnemyFromFile(csd~"stage2/Mokou1.txt");
CompileEnemyFromFile(csd~"stage2/Mokou2.txt");
CompileEnemyFromFile(csd~"stage2/BossDefeat.txt");
}

	if(StagePhaseProgress==3 && StagePractice)
	{
		StageFireEffect;
	}

	if(StagePhaseProgress!=3 || StagePractice==false)
	{
	PlayMusic(BGM[3]);
	}

	SetCommonData("BurstStop",false);
	wait(120);
if(StagePhaseProgress==0 || StagePractice==false)
{
	Stage2Unit1;
	wait(30);
	Stage2Unit2;
	wait(90);
	Stage2Unit3;
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy05.txt",GetCenterX-64,GetClipMinY-32,1,50,1);
	wait(60);
	Stage2Unit4;
	wait(60);
	Stage2Unit5;
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy05.txt",GetCenterX+64,GetClipMinY-32,1,130,1);
	wait(180);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMaxX+16,GetClipMinY+50,1,130,-1);
	wait(60);
	Stage2Unit14;
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMinX-16,GetClipMinY+50,1,130,1);
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy07.txt",GetCenterX+130,GetClipMinY-48,1,130,1);
	wait(120);
	Stage2Unit6;
	wait(30);
	Stage2Unit7;
	wait(30);
	Stage2Unit8;
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy07.txt",GetCenterX-130,GetClipMinY-48,1,130,-1);
	wait(180);
	Stage2Unit9;
	wait(60);
	Stage2Unit10;
	wait(120);
	Stage2Unit11;
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy08.txt",GetCenterX+120,GetClipMinY-48,1,90,1);
	wait(60);
	Stage2Unit12;
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy08.txt",GetCenterX-120,GetClipMinY-48,1,90,1);
	wait(30);
	Stage2Unit15;

	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMaxX+16,GetClipMinY+50,1,130,-1);

	wait(30);
//	Stage2Unit6;
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy08.txt",GetCenterX+120,GetClipMinY-48,1,90,1);
	wait(30);
	wait(90);
	Stage2Unit7;
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMinX-16,GetClipMinY+50,1,130,1);
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy08.txt",GetCenterX-120,GetClipMinY-48,1,90,1);
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMaxX+16,GetClipMinY+50,1,130,-1);
	Stage2Unit13;
	wait(300);
}
/////////////////////////////////////////////////////////////
if(StagePhaseProgress<=1 || StagePractice==false)
{
	SetCommonData("STAGE2MIDBOSS",true);
	SetCommonData("STAGE2MIDBOSSHAYAMAWASI",true);
	Stage2Hayamawasi;

	Stage2MidBossAppear;

	SetCommonData("STAGE2MIDBOSS",false);
	loop
	{
		if(GetCommonDataDefault("STAGE2MIDBOSSHAYAMAWASI",true)==false){break;}
		yield;
	}
}
if(StagePhaseProgress<=2 || StagePractice==false)
{	
	StageFireEffect;
	BGStage2MidBossEnd;
	Stage2Unit16;
	wait(300);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy09.txt",GetCenterX+120,GetClipMinY-32,0.5,90,1);
	wait(180);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy09.txt",GetCenterX-120,GetClipMinY-32,0.5,90,1);
	wait(150);
	Stage2Unit9;
	wait(30);
	Stage2Unit17;
	wait(60);
	Stage2Unit18;
	wait(60);
	Stage2Unit19;
	wait(60);
	Stage2Unit20;
	Stage2Bgshift;
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy10.txt",GetCenterX-80,GetClipMinY-32,0.4,90,1);
	wait(120);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy10.txt",GetCenterX+80,GetClipMinY-32,0.4,90,1);
	wait(120);
	Stage2Unit21;
	wait(45);
	Stage2Unit22;

	SetCommonData("Stage2HAYMAWASHInum",0);
	SetCommonData("STAGE2HAYAMAWASI1",true);
	Stage2Hayamawasi1;

//	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMinX-16,GetClipMinY+50,1,130,1);
	wait(120);
//	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMaxX+16,GetClipMinY+50,1,130,-1);
	wait(90);
//	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMinX-16,GetClipMinY+50,1,130,1);
	wait(90);
//	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06.txt",GetClipMaxX+16,GetClipMinY+50,1,130,-1);
	wait(180);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy09.txt",GetCenterX+80,GetClipMinY-32,0.4,90,1);
	wait(60);
	Stage2Unit23;
	wait(180);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy09.txt",GetCenterX-80,GetClipMinY-32,0.4,90,1);
	wait(60);
	Stage2Unit24;
	wait(240);
	Stage2Unit25;
	wait(90);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy10.txt",GetCenterX+120,GetClipMinY-32,0.5,90,1);
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy10.txt",GetCenterX+0,GetClipMinY-32,0.5,90,1);
	wait(60);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy10.txt",GetCenterX-120,GetClipMinY-32,0.5,90,1);
	wait(60);
	Stage2Unit26;
	Stage2Unit27;
	wait(360);
	//////////////////////////////
	Stage2Bgm;
	wait(240);
}
if(StagePhaseProgress<=3 || StagePractice==false)
{
	if(StagePhaseProgress==3 && StagePractice==true)
	{
		PlayMusic(BGM[4]);
	}
	SetCommonData("STAGE2BOSS",true);
	wait(1);
			
	Stage2BossAppear;

	SetCommonData("STAGE2BOSS",false);
	CreateEnemyFromFile(csd~"stage2/DeleteEnemy.txt",GetClipMinX-64,GetCenterY-48,2,90,1);
	//BGStage2BossEnd;
}

}

function Stage2MidBossAppear
{
	if(GetCommonDataDefault("ExclusiveBoss",false)==true)
	{
		SetCommonData("IsMSDBossExisting",true);

		CreateEnemyFromFile(csd~"stage2/LunaChild.txt",GetClipMaxX-60,GetClipMinY-16,2,0,0);
		WaitForZeroEnemy;
		CreateEnemyFromFile(csd~"stage2/BossEscape.txt",GetClipMaxX-60,GetClipMinY-16,2,0,0);
		WaitForZeroEnemy;

		SetCommonData("IsMSDBossExisting",false);
	}
	else
	{
		CreateEnemyBossFromFile(csd~"stage2/Stage2MidBoss.txt",GetClipMaxX-60,GetClipMinY-16,2,0,0);
		WaitForZeroEnemy;
	}
}

function Stage2BossAppear
{
	if(GetCommonDataDefault("ExclusiveBoss",false)==true)
	{
		SetCommonData("IsMSDBossExisting",true);

		CreateEnemyFromFile(csd~"stage2/Mokou1.txt",GetClipMaxX-60,GetClipMinY-16,2,0,0);
		WaitForZeroEnemy;
		CreateEnemyFromFile(csd~"stage2/Mokou2.txt",GetClipMaxX-60,GetClipMinY-16,2,0,0);
		WaitForZeroEnemy;
		CreateEnemyFromFile(csd~"stage2/BossDefeat.txt",GetClipMaxX-60,GetClipMinY-16,2,0,0);
		CompileEnemyFromFile(csd~"stage3/LoadEnemy.txt");
		WaitForZeroEnemy;
		LoadingStage3Data;
		SetCommonData("IsMSDBossExisting",false);
	}
	else
	{
		CreateEnemyBossFromFile(csd~"stage2/Stage2Boss.txt",GetClipMinX,GetClipMinY+64,2,0,0);
		WaitForZeroEnemy;
	}

	task LoadingStage3Data
	{
	let wt=3;
	if(StagePractice==false && PreLoad==1)
	{
	CreateEnemyFromFile(csd~"stage3/LoadEnemy.txt",0,0,0,0,0);
	ClearByteCodeCache;
	wait(60);
	CompileEnemyFromFile(csd~"stage3/Stage3Elemental.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy01.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy02.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy02a.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy03.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy03a.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy03b.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy03c.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy04.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy05.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy05a.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy06.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy07.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy08.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy09a.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy09a.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy09b.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy09c.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy09d.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy09e.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy10.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy11.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Stage3Enemy11a.txt");wait(wt);

	CompileEnemyFromFile(csd~"stage3/StarSapphire.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Nue1.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Nue2.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/Nue3.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/BossDefeat.txt");wait(wt);
	CompileEnemyFromFile(csd~"stage3/BossEscape.txt");wait(wt);
	}
	}
}

task Stage2Hayamawasi
{
let count=0;
	loop(840)
	{
		if(GetCommonDataDefault("STAGE2MIDBOSS",true)==false){break;}
		count+=1;
		yield;
	}
	if(count<660){count=660;}
	loop
	{
		ascent(i in 0..3)
		{
		if(count==660+60*i)
		{
			CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-120,GetClipMinY-32,2.5,90,1);
		}
		if(count==675+60*i)
		{
			CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-40,GetClipMinY-32,2.5,90,1);
		}
		if(count==690+60*i)
		{
			CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+40,GetClipMinY-32,2.5,90,1);
		}
		if(count==705+60*i)
		{
			CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+120,GetClipMinY-32,2.5,90,1);
		}
		}
		if(count>=840){break;}
	count+=1;
	yield;
	}
	SetCommonData("STAGE2MIDBOSSHAYAMAWASI",false);
}

task Stage2Hayamawasi1
{
	let count=-30;
	let dir=1;
	let X=[GetClipMaxX+16,0,GetClipMinX-16];
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy06a.txt",X[dir+1],GetClipMinY+50,1,130,dir);
	dir*=-1;
	loop(450)
	{
		if(GetCommonData("Stage2HAYMAWASHInum")==0 || count>=90)
		{
			CreateEnemyFromFile(csd~"stage2/Stage2Enemy06a.txt",X[dir+1],GetClipMinY+50,1,130,dir);
			dir*=-1;
			count=0;
		}
		count+=1;
		yield;
	}
SetCommonData("STAGE2HAYAMAWASI1",false);
}

task Stage2Bgm
{
	FadeOutMusic(BGM[3],5);
	wait(360);
	DeleteMusic(BGM[3]);
	PlayMusic(BGM[4]);
}
task Stage2Unit1
{
	loop(4)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX-16,GetClipMinY+125,1.0,20,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX-16,GetClipMinY+170,1.0,20,1);
		wait(45);
	}
}

task Stage2Unit2
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy03.txt",GetCenterX-40,GetClipMinY-32,1,90,1);
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy03.txt",GetCenterX-80,GetClipMinY-32,1,90,1);
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy03.txt",GetCenterX-120,GetClipMinY-32,1,90,1);
}

task Stage2Unit3
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+0,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+60,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+30,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+90,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+60,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+90,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+120,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+75,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+105,GetClipMinY-16,0.5,90,1);
}

task Stage2Unit4
{
/*	loop(6)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+80,1.0,160,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+120,1.0,160,1);
		wait(45);
	}
*/	loop(4)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+75,1.0,160,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+120,1.0,160,1);
		wait(60);
	}
}

task Stage2Unit5
{
	loop(4)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX+32,GetClipMinY-16,1.0,90,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX+80,GetClipMinY-16,1.0,90,1);
		wait(45);
	}
}

task Stage2Unit6
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMinX+150,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMinX+100,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMinX+50,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMinX+125,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMinX+75,GetClipMinY-16,2,90,1);

}

task Stage2Unit7
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+60,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-30,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+30,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-60,GetClipMinY-16,0.5,90,1);
	wait(10);
}

task Stage2Unit8
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy03.txt",GetCenterX+40,GetClipMinY-32,0.75,90,1);
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy03.txt",GetCenterX+120,GetClipMinY-32,0.75,90,1);
	wait(30);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy03.txt",GetCenterX+80,GetClipMinY-32,0.75,90,1);
}

task Stage2Unit9
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMaxX-150,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMaxX-100,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMaxX-50,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMaxX-125,GetClipMinY-16,2,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetClipMaxX-75,GetClipMinY-16,2,90,1);

}

task Stage2Unit10
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-60,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+30,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-30,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+60,GetClipMinY-16,0.5,90,1);
	wait(10);
}

task Stage2Unit11
{
	loop(4)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+100,1.5,150,1);
		wait(30);
	}
}

task Stage2Unit12
{
	loop(6)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX-16,GetClipMinY+80,1.5,30,1);
		wait(30);
	}
}

task Stage2Unit13
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+80,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+140,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+50,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+110,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+20,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-80,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-140,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-50,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-110,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-20,GetClipMinY-16,0.5,90,1);
	wait(10);
}

task Stage2Unit14
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-80,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-140,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-50,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-110,GetClipMinY-16,0.5,90,1);
	wait(10);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-20,GetClipMinY-16,0.5,90,1);
	wait(10);
}

task Stage2Unit15
{
	loop(4)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+95,1.5,150,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+140,1.5,150,1);
		wait(45);
	}
}

task Stage2Unit16
{
	loop(5)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-120,GetClipMinY-16,1.5,150,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX-80,GetClipMinY-16,1.0,90,1);
		wait(15);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-40,GetClipMinY-16,1.5,150,1);
		wait(15);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+40,GetClipMinY-16,1.5,150,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX+80,GetClipMinY-16,1.0,90,1);
		wait(15);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+120,GetClipMinY-16,1.5,150,1);
		wait(15);
	}
}

task Stage2Unit17
{
	loop(8)
	{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX-16,GetClipMinY+120,1.0,20,1);
	wait(45);
	}
}

task Stage2Unit18
{
	loop(5)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+40,GetClipMinY-16,1.5,150,1);
		wait(15);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+120,GetClipMinY-16,1.5,150,1);
		wait(15);
	}
}

task Stage2Unit19
{
	loop(8)
	{
	//CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+120,1.0,150,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+80,1.0,150,1);
	wait(45);
	}
}

task Stage2Unit20
{
	loop(5)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-40,GetClipMinY-16,1.5,150,1);
		wait(15);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-120,GetClipMinY-16,1.5,150,1);
		wait(15);
	}
}

task Stage2Unit21
{
	loop(5)
	{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX+40,GetClipMinY-16,1.0,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX+80,GetClipMinY-16,1.0,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX+120,GetClipMinY-16,1.0,90,1);
	wait(90);
	}
}

task Stage2Unit22
{
	loop(5)
	{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX-40,GetClipMinY-16,1.0,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX-80,GetClipMinY-16,1.0,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetCenterX-120,GetClipMinY-16,1.0,90,1);
	wait(90);
	}
}

task Stage2Unit23
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-40,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-100,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-70,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-130,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX-60,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX-90,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX-120,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX-75,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX-105,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-40,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-100,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-70,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-130,GetClipMinY-16,0.5,90,1);
}

task Stage2Unit24
{
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+40,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+100,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+70,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+130,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+60,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+90,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+120,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+75,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy02.txt",GetCenterX+105,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+40,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+100,GetClipMinY-16,0.5,90,1);
	wait(15);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+70,GetClipMinY-16,0.5,90,1);
	CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+130,GetClipMinY-16,0.5,90,1);

}


task Stage2Unit25
{
	loop(2)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX-60,GetClipMinY-16,1.5,150,1);
		wait(30);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy04.txt",GetCenterX+60,GetClipMinY-16,1.5,150,1);
		wait(30);
	}
}

task Stage2Unit26
{
let y=0;
	loop(8)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX-16,GetClipMinY+80+y,1.0,15,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMinX-16,GetClipMinY+120+y,1.0,15,1);
		wait(45);
		y+=12;
	}
}

task Stage2Unit27
{
let y=0;
	loop(8)
	{
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+0+y,1.0,165,1);
		CreateEnemyFromFile(csd~"stage2/Stage2Enemy01.txt",GetClipMaxX+16,GetClipMinY+40+y,1.0,165,1);
		wait(45);
		y+=12;
	}
}