~Hakurei Shrine~ > Rika and Nitori's Garage Experiments
Orbitals turning around Orbitals
<< < (2/2)
Naut:
A bunch of moderate editing.... I did remake it y'know. You're right though, took me about 5 hours, so it isn't hard once you know the math (plus a little guess and check).
EDIT: I love you Drake <3


And...


--- Code: ---#TouhouDanmakufu
#Title[Epicycloid]
#BackGround[User(.\PIC\black.png, 1, 1)]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

let R = 70;
let r = 40;
let v = 2;

        let a = 0;
  
    @Initialize {

   SetLife(2000);
   SetTimer(40);
   SetMovePosition02(GetCenterX, GetCenterY-100, 20);
    }

    @MainLoop {
       SetCollisionB(GetX, GetY, 24);
       CreateShotA(0, GetX + ((R + r) * cos(a)) - (r * cos(a * ((R / r) +1))), GetY + ((R + r) * sin(a)) - (r * sin(a * ((R / r) + 1))), 20);
   SetShotDataA(0, 0, 0, a*2, 0, 0, 0, RED01);
   SetShotDataA(0, 90, 0, a*2, 0, 0.05, v, RED01);
   FireShot(0);
   a+=3;
       CreateShotA(0, GetX + ((R + r) * cos(a)) - (r * cos(a * ((R / r) +1))), GetY + ((R + r) * sin(a)) - (r * sin(a * ((R / r) + 1))), 20);
   SetShotDataA(0, 0, 0, a*2, 0, 0, 0, RED01);
   SetShotDataA(0, 90, 0, a*2, 0, 0.05, v, RED01);
   FireShot(0);
   a+=3;
   v+=0.001;
  
   } 
}

--- End code ---

Or even....


--- Code: ---#TouhouDanmakufu
#Title[Epicycloid]
#BackGround[User(.\PIC\black.png, 1, 1)]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

let R = 70;
let r = 40;
let v = 2;

        let a = 0;
  
    @Initialize {

   SetLife(2000);
   SetTimer(40);
   SetMovePosition02(GetCenterX, GetCenterY-100, 20);
    }

    @MainLoop {
       SetCollisionB(GetX, GetY, 24);
       CreateShotA(0, GetX + ((R + r) * cos(a)) - (r * cos(a * ((R / r) +1))), GetY + ((R + r) * sin(a)) - (r * sin(a * ((R / r) + 1))), 20);
   SetShotDataA(0, 0, 0, a*2, 0, 0, 0, RED01);
   SetShotDataA(0, 90, 0, a*2, 0, 0.05, v, RED01);
   FireShot(0);
   a+=2;
       CreateShotA(0, GetX + ((R + r) * cos(-a)) - (r * cos(-a * ((R / r) +1))), GetY + ((R + r) * sin(-a)) - (r * sin(-a * ((R / r) + 1))), 20);
   SetShotDataA(0, 0, 0, -a*2, 0, 0, 0, RED01);
   SetShotDataA(0, 90, 0, -a*2, 0, 0.05, v, RED01);
   FireShot(0);
   a+=2;
   v+=0.001;
  
   }
  
}

--- End code ---

Okay last one I swear....


--- Code: ---#TouhouDanmakufu
#Title[Hypotrochoid]
#BackGround[User(.\PIC\black.png, 1, 1)]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

let R = 150;
let r = 50;
let d = 60;

        let a = 0;
   
    @Initialize {

   SetLife(2000);
   SetTimer(40);
   SetMovePosition02(GetCenterX, GetCenterY-70, 20);
   rose;
     
    }

    @MainLoop {
       SetCollisionB(GetX, GetY, 24);
       yield;
   }

    @DrawLoop {
    }

    @Finalize {
    }

    task rose{
        loop(100){yield;}
        loop{
            newpoint(0, RED01);
            newpoint(120, GREEN01);
            newpoint(240, BLUE01);
            a+=3;
            yield;yield;
        }
    }

    task newpoint(aaa, ccc){
          let getxa;
          let getya;
          let anglereflex;
          let reflectcount = 0;
        let objshot = Obj_Create(OBJ_SHOT);
        Obj_SetX(objshot, GetX + ((R - r) * cos(a + aaa)) + (d * cos(a * ((R - r) / r + aaa))));
        Obj_SetY(objshot, GetY + ((R - r) * sin(a + aaa)) - (d * sin(a * ((R - r) / r + aaa))));
        Obj_SetSpeed(objshot, 0);
        Obj_SetAngle(objshot, (a + aaa)*2);
        ObjShot_SetGraphic(objshot, ccc);
        ObjShot_SetDelay  (objshot, 40);
let ff = -60;
let ll = 0;

       while(!Obj_BeDeleted(objshot)){
ff++;
if(ff<=120 && ff>=70){
Obj_SetSpeed(objshot, ll);
ll+=0.02;
}
           getxa = Obj_GetX(objshot);
           getya = Obj_GetY(objshot);
           if(getxa < GetClipMinX && reflectcount == 0){
            anglereflex = -Obj_GetAngle(objshot)+180;
let position = GetClipMinX - Obj_GetX(objshot);
Obj_SetX(objshot, GetClipMinX + position);
            Obj_SetAngle(objshot, anglereflex);
            reflectcount = 5;}
           if(getxa > GetClipMaxX && reflectcount == 0){
            anglereflex = -Obj_GetAngle(objshot)+180;
let position = GetClipMaxX - Obj_GetX(objshot);
Obj_SetX(objshot, GetClipMaxX + position);
            Obj_SetAngle(objshot, anglereflex);
            reflectcount = 5;}
           if((getya < GetClipMinY) && reflectcount == 0){
            anglereflex = -Obj_GetAngle(objshot);
let position = GetClipMinY - Obj_GetY(objshot);
Obj_SetY(objshot, GetClipMinY + position);
            Obj_SetAngle(objshot, anglereflex);
            reflectcount = 5;}
          yield;
           
          }
    }
   
}
--- End code ---
Suikama:
You guys rock ಥ_ಥ

Now I take your math and raise you a BROFIST: http://www.mediafire.com/?ghjom2z2wyc
Drake:
You know you can change R, r and d and get different results, right?
Naut:
But that involves more than holding down ctrl, c and v.
Navigation
Message Index
Previous page

Go to full version