Okay, here's my code:
#TouhouDanmakufu
#Title[Sun Spin]
#Text[]
#Image[]
#BackGround[Default]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main
{
#include_function "lib\SHOT_REPLACE\shot_replace.dnh"
//let BossImage = GetCurrentScriptDirectory ~ "boss_yukari.png";
//let BossCutIn = GetCurrentScriptDirectory ~ "Yukari.png";
let frame = -60;
let frame2 = -20;
let Angle = 0;
let Angle2 = 0;
//let ShotSFX = "script\sfx\shot.wav";
//let LaserSFX = "script\sfx\laser.wav";
let delay = 80;
let AngleSave = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let AngleSave2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let AngleChange = [7.5, 7.5, 7.5, 7.5, 0, 0];
@Initialize
{
shotinit;
//LoadGraphic(BossImage);
SetLife(1024);
SetDamageRate(10,2);
SetTimer(152);
SetInvincibility(30);
//CutIn(YOUMU, "Sun Spin", BossCutIn, 0, 0, 256, 320);
SetScore(70000);
SetEnemyMarker(true);
MagicCircle(true);
SetMovePosition02(GetCenterX,GetCenterY-100,30);
}
@MainLoop
{
SetCollisionA(GetX(),GetY(),32);
SetCollisionB(GetX(),GetY(),24);
if(frame == 0)
{
let laser = 0;
let i = 0;
let c = AngleChange[rand_int(0, 5)];
loop(24)
{
CreateLaserB(laser, 200, 10, YELLOW01, 150);
SetLaserDataB(laser, 0, 0, 0, 0, 0, 2, Angle, 2);
SetLaserDataB(laser, 460, 0, 0, 0, NULL, 1.5, NULL, 1.5);
SetLaserDataB(laser, 500, 0, 0, 0, NULL, 1, NULL, 1);
SetLaserDataB(laser, 540, 0, 0, 0, NULL, 0.5, NULL, 0.5);
SetLaserDataB(laser, 580, 0, 0, 0, NULL, 0, NULL, 0);
SetShotKillTime(laser, 680);
//PlaySE(LaserSFX);
FireShot(laser);
laser++;
CreateLaserB(laser, 200, 10, RED01, 150);
SetLaserDataB(laser, 0, 0, 0, 0, 0, -2, (Angle+c), -2);
SetLaserDataB(laser, 460, 0, 0, 0, NULL, -1.5, NULL, -1.5);
SetLaserDataB(laser, 500, 0, 0, 0, NULL, -1, NULL, -1);
SetLaserDataB(laser, 540, 0, 0, 0, NULL, -0.5, NULL, -0.5);
SetLaserDataB(laser, 580, 0, 0, 0, NULL, 0, NULL, 0);
SetShotKillTime(laser, 680);
FireShot(laser);
laser++;
AngleSave[i] = Angle;
AngleSave2[i] = (Angle+c);
Angle += 15;
i++;
}
}
if(frame >= 580 && frame < 640)
{
if(frame%5 == 0)
{
let i = 0;
let shot = 0;
let curve = rand(0.5, 1);
loop(24)
{
CreateShotA(shot, GetX, GetY, 25);
SetShotDataA(shot, 0, 6, AngleSave[i], 0, 0, 0, YELLOW05);
SetShotDataA(shot, 10, NULL, NULL, 0, 0, 0, YELLOW05);
SetShotDirectionType(PLAYER);
SetShotDataA(shot, 30, NULL, NULL, 0, -1, 0, YELLOW05);
SetShotDataA(shot, delay, NULL, 0, 0, 0.1, 8, YELLOW05);
FireShot(shot);
shot++;
SetShotDirectionType(ABSOLUTE);
CreateShotA(shot, GetX, GetY, 25);
SetShotDataA(shot, 0, 6, AngleSave2[i], 0, 0, 0, RED05);
SetShotDataA(shot, 10, NULL, NULL, 0, 0, 0, RED05);
SetShotDirectionType(PLAYER);
SetShotDataA(shot, 30, NULL, NULL, 0, -1, 0, RED05);
SetShotDataA(shot, delay, NULL, 0, 0, 0.1, 8, RED05);
FireShot(shot);
SetShotDirectionType(ABSOLUTE);
i++;
}
delay += 20;
}
}
if(frame2 == 0)
{
SetMovePositionRandom01(100, 15, 15, GetCenterX - 130, GetCenterY - 150, GetCenterX + 130, GetCenterY - 35);
frame2 = -20;
}
frame++;
if(frame < 550)
{
frame2++;
}
if(frame == 710)
{
frame = 0;
delay = 80;
}
}
@DrawLoop
{
//SetTexture(BossImage);
//SetGraphicRect(40,33,91,94);
//DrawGraphic(GetX, GetY);
}
@Finalize
{
//DeleteGraphic(BossImage);
}
}
(I commented out all the SFX and graphics-related stuff because I don't really want to upload the same things over and over. It's just annoying.)
I honestly can't see what's wrong here. Also, somehow, the bullets I spawn at the end don't even appear at the right place anymore, though they do when I spawn 36 lasers of each color... (I reduced it to 24 because 72 lasers plus 72 bullets every 5 frames when they appear lags Danmakufu for me...)