Advertisement
Guest User

Curvy Bullets

a guest
Jul 17th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. task BulletFormation {
  2.     let angleS = angleToPlayer(Boss);
  3.    
  4.     //All values here are exemplary. Change them according to your need and at your will.
  5.  
  6.     while(!Obj_IsDeleted(Boss)){    //loop the task until the boss dies
  7.         ShotA1(angleS,-1,6,4,3);
  8.         angleS += 11;           //the bullet formations are shot every 11 degrees
  9.         wait(12);               //the bullet formations are shot every 12 frames
  10.        
  11.         //DON'T YIELD
  12.     }
  13.    
  14.     task ShotA1(angle,offset,num1,num2,shotID){
  15.         ascent(a in 0..num1){   //sets how many BULLETS are in ONE formation
  16.             loop(num2){         //sets how many BULLET FORMATIONS are fired
  17.                 let shot1A = CreateShotA1(BossX+48*cos(angle),BossY+48*sin(angle),3-a/num1,angle,shotID,12);
  18.                 angle += 360/num2;  //sets how many COLUMNS of bullet formations are in a complete circle
  19.             }
  20.             angle += offset;    //determines whether the bullet formation is CURVED (offset < 0 or offset > 0) or STRAIGHT (offset == 0)
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement