Use Obj_SetX and Obj_SetY to guide it's movement, instead of the speed functions. it's more difficult, but the bullet's graphic is automatically adjusted for different angles of movement, so you'd have to keep setting it's angle to whatever you want it to be, then guide it's movement each frame. It's not as long and tiring as it sounds; just a bit of trigonometry, but it's still a pain in the ass.
For Drake:
#TouhouDanmakufu
#Title[What]
#BackGround[User(.\PIC\black.png, 1, 1)]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script/ExRumia/img/ExRumia.png";
let vxa = -3;
@Initialize {
SetLife(6000);
SetTimer(100);
SetScore(5000000);
MagicCircle(false);
SetDamageRate(100, 20);
SetEnemyMarker(true);
LoadGraphic(ImgBoss);
LoadSE(se1);
SetMovePosition02(GetCenterX, GetCenterY - 100, 1);
squares;
}
@MainLoop {
SetCollisionB(GetX, GetY, 24);
SetShotAutoDeleteClip(64, 400, 64, 64);
yield;
}
@DrawLoop {
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
DeleteSE(se1);
}
task squares{
loop(10){yield;}
let vxa = -3;
loop(33){
CreateShotA(0, GetX, GetY, 6);
CreateShotA(1, GetX, GetY, 6);
SetShotDirectionType(PLAYER);
SetShotDataA_XY(0, 0, vxa, 3, 0, 0, 0, 0, RED01);
SetShotDataA_XY(1, 0, vxa, -3, 0, 0, 0, 0, RED01);
vxa+= 3/16;
FireShot(0);
FireShot(1);}
vxa-= 6/16;
loop(31){
CreateShotA(2, GetX, GetY, 6);
CreateShotA(3, GetX, GetY, 6);
SetShotDirectionType(PLAYER);
SetShotDataA_XY(2, 0, 3, vxa, 0, 0, 0, 0, RED01);
SetShotDataA_XY(3, 0, -3, vxa, 0, 0, 0, 0, RED01);
vxa-= 3/16;
FireShot(2);
FireShot(3);
}
squares;
}
}
I like to think I cheated to make the squares, but here is the code you requested none-the-less. Needless CreateShotA's, I know, but I don't have the parameters of most of the shot functions memorized yet.