So I've been looking through the basics and the first little bit of the intermediate tutorials, and I'm used to the general CreateShot commands and all that stuff.
And I'm wondering why this isn't working:
#TouhouDanmakufu
#Title[Attack Name]
#Text[Attack Description]
#BGM[.\bgm.mp3]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let frame = 0;
@Initialize {
SetLife(1000);
SetEnemyMarker(true);
SetTimer(60);
MagicCircle(true);
SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 24);
if(frame==5){
CreateShot12(46, 40, 10, 2, -0.5, 1, -20, 10, RED01, 10);
CreateShot12(400, 40, -10, 2, 0.5, 1, 20, 10, RED01, 10);
frame = 0;
frame++;
}
if(frame==20){
CreateShot01(GetX, GetY, 3, GetAngleToPlayer, GREEN01, 10);
frame = 0;
frame++;
}
}
@DrawLoop {
}
@Finalize {
}
}
I'm trying to get the RED01's to fire on different frames than the GREEN01's, but niether of them spawn when the script runs, no errors though...
I thought I might have to use alternative/case, but the same nothing happens (though I don't know if I've done this one right...).
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 24);
alternative(frame)
case(5){
CreateShot12(46, 40, 10, 2, -0.5, 1, -20, 10, RED22, 10);
CreateShot12(400, 40, -10, 2, 0.5, 1, 20, 10, RED22, 10);
frame = 0;
frame++;
}
case(20){
CreateShot01(GetX, GetY, 3, GetAngleToPlayer, GREEN22, 10);
frame = 0;
frame++;
}
}
The two separate shots work fine on their own, but I don't know how I'm supposed to get them to work together.