I think there are two ways to change the bullet color:
1. Use a custom shotsheet and use rand_int() to make Danmakufu randomly choose an bullet ID between the bounds you specified.
2. Also usable with the default Danmakufu bullets (I think). Make an array of all the bullets you want to use and randomly choose one with rand_int.
If you want different bullets, just include them in the array.
Something like:
task barrage{
let x = 0;
let dir = 0;
let color = [RED31,BLUE31,YELLOW31];
wait(1);
loop(5){
PlaySE(sfx2);
while(x<36){
CreateShotA(1,GetEnemyX,GetEnemyY,1);
SetShotDataA(1,0,1,dir,0,-0.5,8,color[rand_int(0,2)]); //Arrays start at 0.
FireShot(1);
dir+=360/36;
x++;
}
x = 0;
dir = 0;
wait(5);
yield;
}
}
Shooting bullets in random directions is simple, just set the angle to rand(something,something).