Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task mainTask{
- wait(120);
- let count = 0;
- loop{
- let dir = GetAngleToPlayer - 8;
- let v = 0;
- loop(16){
- Bullet(GetX,GetY+20,1+v,dir,43);
- Bullet(GetX,GetY+20,2+v,dir,43);
- dir+=8;
- v+=0.3;
- wait(0.5);
- }
- let v = 0;
- let dir = GetAngleToPlayer + 8;
- loop(16){
- Bullet(GetX,GetY+20,1+v,dir,43);
- Bullet(GetX,GetY+20,2+v,dir,43);
- dir-=8;
- v+=0.3;
- wait(0.5);
- }
- if(count==0){ let dir = 0; }
- if(count==1){ let dir = 11.25; }
- loop(16){
- Bullet(GetX+10,GetY-30,1,dir,51);
- dir+=360/16;
- }
- wait(15);
- loop(16){
- Bullet(GetX+10,GetY-30,1,dir,51);
- dir+=360/16;
- }
- count++;
- if(count==2){ count=0; }
- SetMovePosition03(rand_int(GetClipMinX+75,GetClipMaxX-75),rand_int(GetClipMinY+75,GetCenterY), 8, 2);
- wait(120);
- }
- }
- task Bullet(x, y, v, angle, g) {
- let obj=Obj_Create(OBJ_SHOT);
- PlaySE(Shot1);
- Obj_SetPosition(obj, x, y);
- Obj_SetAngle(obj, angle);
- Obj_SetSpeed(obj, v);
- ObjShot_SetGraphic(obj, g); //43 51
- ObjShot_SetDelay (obj, 0);
- ObjShot_SetBombResist (obj, true);
- }
- // wait function
- function wait(w){
- loop(w){yield;}
- }
Advertisement
Add Comment
Please, Sign In to add comment