Ok, so I wrote this:
task fireInArc {
let dir = angleToPlayer;
let numShot = 6;
let arc = 180/2;
let arcUp = 180/numShot;
ascent(i in 0..numShot+1)
{ CreateShotA1(bossX,bossY,3,(dir-arc)+(arcUp*i),14,0); }
// ascent(i in 0..numShot)
// { CreateShotA1(bossX,bossY,3,(dir-arc)+(arcUp*(i+1)),14,0); }
}
And it works fine. I get 6 shots (+1) in a perfect 180 arc that angles toward the player. However, I wonder how can I remove that numShot+1 from ascent without breaking the arc (more correctly, making the arc fall short of 180 deg's).
This code also has that problem:
task triangleShot2 {
let s = 3; // speed.
let a = GetAngleToPlayer(bossObj)-(180/2); // angle.
let numShot = 6;
loop (numShot) {
ascent(i in 0..4) { // ascends the number of waves.
ascent(ii in 0..i+1) { // ascends the bullets spread(arc).
CreateShotA1(bossX, bossY, s/cos(i*3), (a-i) + (ii*2), 81+i, 0);
}
wait(3)
}
a += 180/numShot;
}
}
But this code, I also want the loop to fire instantly, but when I remove the wait, the Triangles become Bullet Walls. yikes!