Okay. Then how would I be able to fire a bullet, say, with a randomized angle of either -10, 0, or 10, but ONLY one of those numbers, using an array?
What I am trying to do here is apparently invalid:
#TouhouDanmakufu
#Title[Laser Test]
#Text[Test script]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\thC\IMAGE\CHAR\DOT\boss_remilia.png";
let count = -60;
let count2 = 0;
let a = 0;
let b = 0;
let c = [-10, 0, 10];
@Initialize {
SetLife(2000);
SetTimer(60);
SetScore(10000000);
LoadUserShotData(GetCurrentScriptDirectory~"UserShotData.txt");
SetEnemyMarker(true);
SetMovePosition02(225, 160, 60);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 100, 100);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if(count == 10) {
PlaySE("script\Remilia Spell Cards\sfx\Laser2.wav");
CreateLaser01(GetX, GetY, 6, GetAngleToPlayer + c[rand(1, 2, 3)], 80, 20, RED04, 10);
CreateLaser01(GetX, GetY, 6, GetAngleToPlayer - 30 + c[rand(1, 2, 3)], 80, 20, BLUE04, 10);
CreateLaser01(GetX, GetY, 6, GetAngleToPlayer + 30 + c[rand(1, 2, 3)], 80, 20, BLUE04, 10);
CreateLaser01(GetX, GetY, 6, GetAngleToPlayer - 90 + c[rand(1, 2, 3)], 80, 20, GREEN04, 10);
CreateLaser01(GetX, GetY, 6, GetAngleToPlayer + 90 + c[rand(1, 2, 3)], 80, 20, GREEN04, 10);
count=0
}
if(count2 == 120){
loop(2){
CreateShot01(GetX, GetY, 3, a+180, GREEN31, 10);
CreateShot01(GetX, GetY, 3, b, GREEN31, 10);
a += 360/2;
a += 7;
b += 360/2;
b -= 7;
}
count2 = 117;
}
count++;
count2++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}