I'm trying to make a curving LaserC spawn bullets from it so that the bullets will be spawned +90 and -90 degree from the lasers current angle (if laser's angle is 90 bullets are fired to 0 and 180). So how do I make danmakufu get the laser's angle when a new bullet is spawned from it?
here is the task. It will propably help you:
task laserC1 {
let x = 0;
let dir = 45;
loop {
while(x<3) {
CreateLaserC(1, GetCenterX, GetCenterY, 10, 50, RED01, 0);
SetLaserDataC(1, 0, 5, dir, 5, 0, 0);
SetLaserDataC(1, 15, 5, NULL, 4, 0, 0);
SetLaserDataC(1, 30, 5, NULL, 3, 0, 0);
SetLaserDataC(1, 45, 5, NULL, 2, 0, 0);
SetLaserDataC(1, 60, 5, NULL, 1, 0, 0);
SetLaserDataC(1, 75, 5, NULL, 0.5, 0, 0);
ascent(i in 0..100){
ascent(j in 0..1){
CreateShotA(2, 0, 0, 10);
SetShotDataA(2, 0, 0, dir+90, 0, 0, 0, RED04);
SetShotDataA(2, 5, 0, NULL, 0, 0.025, 1.5, RED04);
AddShot(i*3, 1, 2, j*15);
}
}
ascent(i in 0..100){
ascent(j in 0..1){
CreateShotA(2, 0, 0, 10);
SetShotDataA(2, 0, 0, dir-90, 0, 0, 0, RED04);
SetShotDataA(2, 5, 0, NULL, 0, 0.05, 1.5, RED04);
AddShot(i*3, 1, 2, j*15);
}
}
FireShot(1);
dir+=360/3;
x++;
}
x = 0;
dir = 45;
wait(300);
yield;
}
}
Oh yeah, and when I spawn bullets from laser how do I make the spawning rate a little smaller, the bullet trails it spawns are too thick and hard to get through (I copied the "ascent" thing so I don't know)