task missiles(){
  if(ObjEnemy_GetInfo(objBoss, INFO_LIFE) <= 0){return;} //Default kill to prevent (0,0) spawning
	//{
    let aux; real r = 0, range = 220;
    const int frame = 60*2; 
	//}
  
  ascent(i in 0..7){
    real a = r + 360/7*i;

    aux = CustomCLaser(bx, by, 0, 0, SHOT_BALL_BLUE, [1.5, 3, 5, 1], BLEND_ADD_ARGB);
    orbitShot(aux, a, [45, +0.5], [range, 30], 3);
    
    a = r + 360/7*i + 360/14;
    aux = CustomCLaser(bx, by, 0, 0, SHOT_BALL_RED, [1.5, 3, 5, 1], BLEND_ADD_ARGB);
    orbitShot(aux, a, [45, -0.5], [range, 30], -3);
  }

}

task orbitShot(obj, r, angleWave, radius, angleSpin){
  real[] rate = [0, 0]; real ang = r, o = 0;
  loop{
    rate = GetRotatedPosition(gx + radius[0]*cos(ang), gy + radius[1]*sin(ang), gx, gy, angleWave[0]*sin(o));
    setpos(obj, rate[0], rate[1]);

    ang += angleSpin; o += angleWave[1]; o = NormalizeAngle(o);
    yield;
  }
}