Oh, then you just have to implement the sine wave when the condition is evaluated as true. Assuming you have an Obj_BeDeleted while loop, then:
if(Obj_GetSpeed(objoption)<0.01){
let dir = angle+45*sin(count*freq);
BulletA(Obj_GetX(objoption),Obj_GetY(objoption),6,dir,71);
BulletA(Obj_GetX(objoption),Obj_GetY(objoption),6,dir+45,71);
BulletA(Obj_GetX(objoption),Obj_GetY(objoption),6,dir+90,71);
BulletA(Obj_GetX(objoption),Obj_GetY(objoption),6,dir-45,71);
BulletA(Obj_GetX(objoption),Obj_GetY(objoption),6,dir-90,71);
count++;
}
When the condition is evaluated as true, "count" will increase by 1 every frame and allow for the bullets' trajectories to smoothly accelerate and decelerate back and forth between the bounds of your amplitude. In this case, since you want for it to move 45 degrees towards each side, said amplitude will be 45. You can change "angle" to anywhere you want for the bullets to begin aiming at. Also, I recommend first testing the generated pattern by firing them from the enemy to begin with, if you still feel confused about how this is supposed to work.