This is ridiculously awesome!
#TouhouDanmakufu
#Title[This is awesome!]
#Text[The title says it all...]
#ScriptVersion[2]
script_enemy_main{
let frame = 0;
let colrs = [RED12, GREEN12, BLUE12, PURPLE12, YELLOW12, AQUA12];
@Initialize{
SetLife(10000);
SetScore(1);
SetMovePosition01(GetCenterX, GetCenterY - 60, 3);
bezier(GetCenterX, GetCenterY + 20 - 60, GetCenterX, GetCenterY - 40 - 60,85,3,1,0);
bezier(GetCenterX, GetCenterY - 20 - 60, GetCenterX, GetCenterY + 40 - 60,85,3,1,0);
bezier(GetCenterX + 20, GetCenterY - 60, GetCenterX - 40, GetCenterY - 60,85,3,1,0);
bezier(GetCenterX - 20, GetCenterY - 60, GetCenterX + 40, GetCenterY - 60,85,3,1,0);
}
@MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;
yield;
}
@DrawLoop{}
@Finalize{}
@BackGround{}
task bezier(x1,y1,x2,y2,p,b,n,o){
let a;
let pos2x = x2;
let pos2y = y2;
let pos1x = x1;
let pos1y = y1;
let bx;
let by;
let dist = 25;
let distmrk = 1;
let ang1 = atan2(y1, x1);
let ang2 = atan2(y2, x2);
let inang = atan2(y2-y1, x2-x1);
let sidx = 30*cos(inang);
let sidy = 30*sin(inang);
while(frame>=-1){
if(dist<=150 && distmrk==1){
distmrk=1;
}else if(dist>150 && distmrk==1){
distmrk=-1;
}else if(dist<=150 && distmrk==-1){
distmrk=-1;
}else if(dist<=0 && distmrk==-1){
distmrk=1;
}
dist+=(2*distmrk);
ang1-=8;
ang2+=12;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY -60 + (dist*sin(ang1));
pos2x = GetCenterX + ((50+sidx)*cos(ang2));
pos2y = GetCenterY -60 + ((50+sidy)*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
let offang = rand(-10, 10);
let colr = colrs[rand_int(0, length(colrs) - 1)];
if(frame%n==o){
ascent(i in (b*-1)..b){
bx = pos2x + (i*3*cos(a));
by = pos2y + (i*3*sin(a));
CreateShot01(bx,by,3,(a-p) + offang,colr,n + 5);
}
}
yield;
}
}//end bezier
}//end script
Merely a short time of fiddling around with the script resulted in this. And it's still only CreateShot01...
EDIT: More, this is seriously fun.
#TouhouDanmakufu
#Title[This is too awesome!]
#Text[The title says it all...]
#ScriptVersion[2]
script_enemy_main{
let frame = 0;
@Initialize{
SetLife(10000);
SetScore(1);
SetMovePosition01(GetCenterX, GetCenterY - 60, 3);
bezier(GetCenterX, GetCenterY - 60 + 20, GetCenterX, GetCenterY - 60 - 20,85,1,1,0, 0,GREEN12);
bezier(GetCenterX, GetCenterY - 60 + 40, GetCenterX, GetCenterY - 40 - 20,85,1,1,0, 1,AQUA12);
bezier(GetCenterX + 20, GetCenterY - 60, GetCenterX - 20, GetCenterY - 60,85,1,1,0, 2,BLUE12);
bezier(GetCenterX + 40, GetCenterY - 60, GetCenterX - 40, GetCenterY - 60,85,1,1,0, 3,PURPLE12);
}
@MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;
yield;
}
@DrawLoop{}
@Finalize{}
@BackGround{}
task bezier(x1,y1,x2,y2,p,b,n,o,an,c){
let a;
let pos2x = x2;
let pos2y = y2;
let pos1x = x1;
let pos1y = y1;
let bx;
let by;
let dist = 90;
let distmrk = 1;
let ang1 = atan2(y1, x1);
let ang2 = atan2(y2, x2);
while(frame>=-1){
if(dist<=150 && distmrk==1){
distmrk=1;
}else if(dist>150 && distmrk==1){
distmrk=-1;
}else if(dist<=150 && distmrk==-1){
distmrk=-1;
}else if(dist<=0 && distmrk==-1){
distmrk=1;
}
dist+=(2*distmrk);
ang1-=8;
ang2+=12-an;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY -60 + (dist*sin(ang1));
pos2x = GetCenterX + (50*cos(ang2));
pos2y = GetCenterY -60 + (50*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
if(frame%n==o){
ascent(i in 0..b){
bx = pos2x;
by = pos2y;
CreateShot01(bx,by,0.5,(a-p) + 360*i/b,c,n + 5);
}
}
yield;
}
}//end bezier
}//end script
EDIT2: Another test provided yet another interesting effect. If you're going to try these, don't worry about the fact that #1 and #3 are practically impossible.
#TouhouDanmakufu
#Title[This is way too awesome!]
#Text[The title says it all...]
#ScriptVersion[2]
script_enemy_main{
let frame = 0;
let colrs = [RED12, GREEN12, BLUE12, PURPLE12, YELLOW12, AQUA12];
@Initialize{
SetLife(10000);
SetScore(1);
SetMovePosition01(GetCenterX, GetCenterY - 60, 3);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,1,2,1);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,2,2,2);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,3,2,3);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,4,2,4);
bezier(GetCenterX, GetCenterY - 80 - 60, GetCenterX, GetCenterY + 80 - 60,90,5,2,5);
}
@MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;
yield;
}
@DrawLoop{}
@Finalize{}
@BackGround{}
task bezier(x1,y1,x2,y2,p,b,n,o){
let a;
let pos2x = x2;
let pos2y = y2;
let pos1x = x1;
let pos1y = y1;
let bx;
let by;
let dist = 25;
let distmrk = 1;
let ang1 = atan2(y1, x1);
let ang2 = atan2(y2, x2);
while(frame>=-1){
if(dist<=150 && distmrk==1){
distmrk=1;
}else if(dist>150 && distmrk==1){
distmrk=-1;
}else if(dist<=150 && distmrk==-1){
distmrk=-1;
}else if(dist<=0 && distmrk==-1){
distmrk=1;
}
dist+=(2*distmrk);
ang1-=1*o;
ang2+=1.5*o;
pos1x = GetCenterX + (dist*cos(ang1));
pos1y = GetCenterY -60 + (dist*sin(ang1));
pos2x = GetCenterX + (50*cos(ang2));
pos2y = GetCenterY -60 + (50*sin(ang2));
a = atan2(pos2y-pos1y,pos2x-pos1x) + p;
let colr = colrs[rand_int(0, length(colrs) - 1)];
let off = rand(-5, 5);
if(frame%n==0){
bx = pos2x;
by = pos2y;
CreateLaser01(bx,by,rand(1.5, 2.5),(a-p) + off + frame/2,50*b,10,colr,n + 5);
}
yield;
}
}//end bezier
}//end script
Massive props for you Drake! Messing around with this provides awesome results even if you don't exactly know what's going on.