So I'm trying to get curvy lasers to shoot bullets to generate a pattern. I know my code is kind of inefficient at the moment, but right now I just want it to work.
//example loop in case the problem lies there
while(i<12){
laser1(1,0,5,dir,4,0,5);
i++;
dir+=30;
}
//laser1
task laser1(id,frame,speed,angle,turn,accel,g){
CreateLaserC(id,GetX,GetY,12,50,108,0);
SetLaserDataC(id,frame,speed,angle,turn,accel,g);
SetLaserDataC(id,90,1.5*speed,angle,0,0,g);
CreateShotA(8,Obj_GetX(id),Obj_GetY(id),15);
SetShotDataA(8,0,1.5,Obj_GetAngle(id)+90,0,0,1.5,109);
CreateShotA(9,Obj_GetX(id),Obj_GetY(id),15);
SetShotDataA(9,0,1.5,Obj_GetAngle(id)-90,0,0,1.5,109);
AddShot(0,id,8,0); //inefficient but it's a test
AddShot(0,id,9,0);
AddShot(15,id,8,0);
AddShot(15,id,9,0);
AddShot(30,id,8,0);
AddShot(30,id,9,0);
AddShot(45,id,8,0);
AddShot(45,id,9,0);
AddShot(60,id,8,0);
AddShot(60,id,9,0);
AddShot(75,id,8,0);
AddShot(75,id,9,0);
AddShot(90,id,8,0);
AddShot(90,id,9,0);
AddShot(105,id,8,0);
AddShot(105,id,9,0);
FireShot(id);
}