I've got a question.
1) Currently, I am messing with the curve laser function (CreateLaserC/SetLaserDataC). I place an AddShot (CreateShotA) to the lasers.
However, I add the bullets to the lasers, but every single bullet added to a laser goes in one direction (i.e. each curved laser goes in different directions, but every other bullet flies in the direction of, for example, 0 degrees). In addition, I am only looping one laser to add each of the bullets (one laser is looped five times in equal distances apart, the AddShot bullets are also looped to the one laser).
Here is the code I am trying to work with.
#TouhouDanmakufu
#Title[Winter Sign "Flower Wither Away"]
#Text[Test script]
#Image[.\img\Scarletsign.png]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\thC\IMAGE\CHAR\DOT\boss_remilia.png";
let count = 0;
let a = 72;
@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);
SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Winter Sign "\""Flower Wither Away"\", "", 0, 0, 0, 0);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 128, 128);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if(count == 90){
PlaySE("lib\THCCL\SE\lazer00.wav");
loop(5){
CreateLaserC(1, GetX, GetY, 10, 30, WHITE01, 0);
SetLaserDataC(1, 0, 5, a, 4, 0, 3);
SetLaserDataC(1, 50, NULL, NULL, 5, -0.05, 2);
SetLaserDataC(1, 90, NULL, NULL, 0, 0.05, 5);
a += 360/5;
ascent(i in 1..900){
CreateShotA(2, 0, 0, 20);
SetShotDataA(2, 0, 1, 30, 0, 0, 1, BLUE11);
CreateShotA(3, 0, 0, 20);
SetShotDataA(3, 0, 1, 180, 0, 0, 1, BLUE11);
CreateShotA(4, 0, 0, 20);
SetShotDataA(4, 0, 1, -30, 0, 0, 1, BLUE11);
AddShot(i*6+60, 1, 2, 0);
AddShot(i*6+61, 1, 3, 0);
AddShot(i*6+61, 1, 4, 0);
}
FireShot(1);
}
}
if(count == 210){
PlaySE("lib\THCCL\SE\lazer00.wav");
loop(5){
CreateLaserC(5, GetX, GetY, 10, 30, WHITE01, 0);
SetLaserDataC(5, 0, 5, a, -4, 0, 3);
SetLaserDataC(5, 50, NULL, NULL, -5, -0.05, 2);
SetLaserDataC(5, 90, NULL, NULL, 0, 0.05, 5);
a += 360/5;
ascent(i in 1..900){
CreateShotA(6, 0, 0, 20);
SetShotDataA(6, 0, 1, 30, 0, 0, 1, BLUE11);
CreateShotA(7, 0, 0, 20);
SetShotDataA(7, 0, 1, 180, 0, 0, 1, BLUE11);
CreateShotA(8, 0, 0, 20);
SetShotDataA(8, 0, 1, -30, 0, 0, 1, BLUE11);
AddShot(i*6+60, 5, 6, 0);
AddShot(i*6+61, 5, 7, 0);
AddShot(i*6+61, 5, 8, 0);
}
FireShot(5);
}
;
count=0
}
count++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
If you notice, I am trying to make a spellcard at least similar to Letty Whiterock's second spellcard of PCB. She creates five curved lasers. However, every one of the AddShot bullets in its respective I.D. only go in one direction. I am not quite sure how to make this easy to explain, but I would like each bullet to get the angle of its respective laser, not just the single core point.
Is it possible to do this with only one laser looped five times, or do I have to create separate lasers and bullets to make it work like Letty's? I want to keep the code as simple as possible.