Sporkinator

Boss Fight

Oct 26th, 2011
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. active = 1;
  2. speed = 0;
  3. if (global.shooting  == 1)
  4. {
  5.     alarm[2] = 5;
  6.     exit;
  7. }
  8. //bullets
  9. switch (global.bossstages)
  10. {
  11.     case 3:
  12.     if timer < 2 * global.RANK + 1
  13.     {
  14.         timer += 1;
  15.         global.owos = 0;
  16.         repeat (global.RANK * 2 + 1)
  17.         {
  18.             iii = instance_create(x,y,obj_bullet_B);
  19.             with (iii)
  20.             {
  21.                 speed = 2 + 0.75 * global.RANK;
  22.                 direction = point_direction(x, y, obj_player.x, obj_player.y) - 30 + (30 / global.RANK) * global.owos;
  23.             }
  24.             global.owos += 1;
  25.         }
  26.     }        
  27.     if (tica  == 0)
  28.     {
  29.         instance_create(x, y, obj_Bs1_bulletgen_A);
  30.         instance_create(x, y, obj_Bs1_bulletgen_B);
  31.         tica = 1;
  32.     }
  33.     if (once == 3)
  34.     {
  35.     repeat (global.RANK)
  36.     {
  37.         iii = instance_create(x + global.tap * cos(degtorad(3 * global.tap)),y + global.tap * sin(degtorad(3 * global.tap)), obj_bullet_C);
  38.         with (iii)
  39.         {
  40.             speed = 1.5 + 0.5 * global.RANK;
  41.             direction = global.tap + global.timeouts - 90;
  42.             global.timeouts += 1;
  43.         }
  44.     }
  45.     repeat (global.RANK)
  46.     {
  47.         iii = instance_create(x - global.tap * cos(degtorad(3 * global.tap)),y + global.tap * sin(degtorad(3 * global.tap)),obj_bullet_C);
  48.         with (iii)
  49.         {
  50.             speed = 1.5 + 0.5 * global.RANK;
  51.             direction = -global.tap - global.timeouts - 90;
  52.             global.timeouts += 1;
  53.         }
  54.     }  
  55.     global.tap += 1;
  56.     once = 0;
  57. }
  58.     once += 1;
  59.     global.tap += 2 / global.RANK;
  60.     alarm[2] = 1;
  61.     break;
  62.     case 2:
  63.     if (stoppers <= global.RANK)
  64.     {    
  65.         iii = instance_create(x, y, obj_bullet_D);
  66.         with (iii)
  67.         {
  68.             speed = 0.02;
  69.             friction = -0.02 * global.RANK;
  70.             alarm[0] = 55;
  71.             direction = 75 - random(60);
  72.         }
  73.         iii = instance_create(x, y, obj_bullet_D);
  74.         with (iii)
  75.         {
  76.             speed = 0.02;
  77.             friction = -0.02 * global.RANK;
  78.             alarm[0] = 55;
  79.             direction = 105 + random(60);
  80.         }
  81.     }
  82.     stoppers += 1;
  83.     if (stoppers > 4)
  84.     {
  85.         stoppers = 0;
  86.     }
  87.     if global.tops < 3 + global.RANK;
  88.     {
  89.         global.tops += 1;
  90.         repeat (10 + 5 * global.RANK)
  91.         {
  92.             iii = instance_create(x,y,obj_bullet_B);
  93.             with (iii)
  94.             {
  95.                 speed = 0.03;
  96.                 friction = -0.03 * global.RANK;
  97.                 direction = (global.monsters + 0.25 * global.tops) * (360 / (10 + 5 * global.RANK));
  98.             }
  99.             global.monsters += 1;
  100.         }
  101.     }
  102.     alarm[2] = 4;
  103.     break;
  104.     case 1:
  105.     if (tina == 0)
  106.     {
  107.         instance_create(x, y, obj_Bs1_bulletgen_C);
  108.         instance_create(x, y, obj_Bs1_bulletgen_D);
  109.         tina = 1;
  110.     }
  111.     iii = instance_create(knights, y, obj_bullet_E);
  112.     with (iii)
  113.     {
  114.         direction = 90;
  115.         speed = random(2) + 2;
  116.         gravity_direction = 260 + random(20);
  117.         gravity = 0.3;
  118.     }
  119.     iii = instance_create(knights - 10, y, obj_bullet_G);
  120.     with (iii)
  121.     {
  122.         direction = 90;
  123.         speed = random(2) + 2;
  124.         gravity_direction = 260 + random(20);
  125.         gravity = 0.3;
  126.         alarm[0] = 65;
  127.     }
  128.     iii = instance_create(640-knights,y,obj_bullet_E)
  129.     with (iii)
  130.     {
  131.         direction = 90;
  132.         speed = random(2) + 2;
  133.         gravity_direction = 260 + random(20);
  134.         gravity = 0.3;
  135.     }
  136.     iii = instance_create(640 - knights - 10, y, obj_bullet_G);
  137.     with (iii)
  138.     {
  139.         direction = 90;
  140.         speed = random(2) + 2;
  141.         gravity_direction = 260 + random(20);
  142.         gravity = 0.3;
  143.         alarm[0] = 65;
  144.     }
  145.     alarm[2] = 5 - global.RANK;
  146.     break;
  147.     case 0:
  148.     break;
  149.     default:
  150.     break;
  151. }
  152. if (add >= 60 + 20 * global.RANK)
  153. {
  154.     movex = x - 100 + irandom(200);
  155.     movey = y - 20 + irandom(40);
  156.     if (movey > 200)
  157.     {
  158.         movey -= 60;
  159.     }
  160.     if (movey < 100)
  161.     {
  162.         movey += 60;
  163.     }
  164.     if (movex > 540)
  165.     {
  166.         movex -= 300;
  167.     }
  168.     if (movex < 100)
  169.     {
  170.         movex += 300;
  171.     }
  172.     move_towards_point(movex, movey, 4);
  173.     friction = 0.1;
  174.     alarm[2] = 180 - global.RANK * 15;
  175.     global.tap = 0;
  176.     global.timeouts = 0;
  177.     timer = 0;
  178.     add = 0;
  179.     global.tops = 0;
  180.     global.monsters = 0;
  181.     tica = 0;
  182.     knights = 0;
  183.     tina = 0;
  184. }
Advertisement
Add Comment
Please, Sign In to add comment