Sorry this took so long, I had to find the will to boot up my old shitty computer.
#TouhouDanmakufu
#Title[Nightmare "Boundary of Wave and Particle"]
#Text[Test script]
#BackGround[User(.\black.png, 1, 1)]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\img\ExRumia.png";
let count = -70;
let fire = 0;
@Initialize {
SetLife(1300);
SetDamageRate(10, 0);
SetTimer(560);
SetScore(1000000);
SetInvincibility( 200 );
LoadGraphic(ImgBoss);
SetMovePosition02(GetCenterX, GetClipMinY + 120, 120);
CutIn(YOUMU, "Nightmare "\""Boundary of Wave and Particle"\", "", 0, 0, 0, 0);
SetGraphicRect(0, 0, 64, 64);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if ((count == 100)){
particle;
}
count++;
yield;
}
@DrawLoop {
SetTexture(ImgBoss);
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
task particle{
let b = 0;
let bup = 0;
let reverse = 0;
let lrar = 0;
let kput = 2;
let krar = 180;
let Length = 100;
let n = 0;
let q = 0;
let RollerX;
let RollerY;
loop{
PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav");
ascent(a in 0..kput){
RollerX = GetX + Length * cos((90+a*krar+b)+1*(360/2));
RollerY = GetY + Length * sin((90+a*krar+b)+1*(360/2));
Theshot(RollerX, RollerY, 2, (90+a*krar+b)-180, GREEN12, 6);
Theshot(RollerX, RollerY, 2, (90+a*krar+b)-150, BLUE12, 6);
Theshot(RollerX, RollerY, 2, (90+a*krar+b)-120, ORANGE12, 6);
Theshot(RollerX, RollerY, 2, (90+a*krar+b)-90, PURPLE12, 6);
}
if (reverse == 0){
if (bup < 80.7){
bup += 0.2;
}
else{
reverse++;
}
}
else{
if (bup > -80.7){
bup -= 0.2;
}
else{
reverse--;
}
}
b += bup;
if (Length > -200){
Length -= 0.5;
}
loop(3){
yield;
}
}
}
task Theshot(x, y, v, angle, graphic, delay){
let obj = Obj_Create(OBJ_SHOT);
let a = 0;
Obj_SetX(obj, x);
Obj_SetY(obj, y);
Obj_SetSpeed(obj, v);
Obj_SetAngle(obj, angle);
ObjShot_SetGraphic(obj, graphic);
ObjShot_SetDelay(obj, delay);
Obj_SetAutoDelete(obj, false);
ObjShot_SetBombResist(obj, true);
while (!Obj_BeDeleted(obj)){
if (a == 120){
Obj_SetAutoDelete(obj, true);
}
a++;
yield;
}
}
}