script_enemy_main{
	let CSD = GetCurrentScriptDirectory;
	let imgFam = CSD ~ "system\purple.png";
	let dir = 0;
	let r = 120;
	let famAngle = GetArgument;
	let ThisShot = GetCurrentScriptDirectory~"system\supershot.txt";

	let spin = 0;
@Initialize{
	SetLife(1000);
	LoadGraphic(imgFam);
	LoadUserShotData(ThisShot);
	maintask;
}

@MainLoop{

SetCollisionA(GetX, GetY, 16);
SetCollisionB(GetX, GetY, 16);
yield;


}
	
@DrawLoop{
	SetTexture(imgFam);
	SetRenderState(ADD);	
	SetAlpha(255);
	SetGraphicScale(0.2,0.2);
	SetGraphicAngle(0,0,spin);
	SetGraphicRect(0,0,400,400);
	DrawGraphic(GetX,GetY);
	spin -= 10;

}

@Finalize{

	//DeleteGraphic(imgFam);

}

task maintask{
	motion;
	yield;
	}

task motion{
	SetMovePosition03(200, 300, 2, 4);
	wait(120);
	SetMovePosition03(GetEnemyX, GetEnemyY, 2, 4);
	}
	
	function wait(w){
		loop(w){yield;}
			}

}