#東方弾幕風 #Title[なんとなく上方向に5WAYバージョン2] #Text[test] #ScriptVersion[2] script_enemy_main { @Initialize{ SetX(GetCenterX); SetY(GetClipMinY+120); SetLife(2000); LoadGraphic("script\img\ExRumia.png"); SetTexture("script\img\ExRumia.png"); SetGraphicRect(0, 0, 63, 63); let angle=[-150,-120,-90,-60,-30]; let speed=[10,6,4,2,1]; let frame=0; let frame2=0; let frame3=0; let frame4=0; let frame5=0; let speed2=[10,6,4,2,1]; task Main { loop(100){yield;} loop{ loop(7){yield;} ascent( let i in 0..5)loop{ //発射位置 CreateShotA(1,GetX,GetY,0); //0フレーム時の処理 SetShotDataA(1,0,0,0,0,0,NULL,WHITE01); //弾道動作 SetShotDataA(1,1,3,angle[i],0,3,3,WHITE01); //発射 FireShot(1); } } }Main; task Main2 { loop(105){yield;} loop{ loop(7){yield;} ascent( let i in 0..5)loop{ CreateShotA(2,GetX,GetY,0); SetShotDataA(2,0,0,0,0,0,0,RED11); SetShotDataA(2,1,3,angle[i],0,3,3,RED11); FireShot(2); } } }Main2; task Main3 { frame++; if(frame==300){ ascent(let i in 0..5)loop{ SetShotDirectionType(PLAYER); CreateShotA(3,GetCenterX+200,GetCenterY-220,0); SetShotDataA(3,0,0,0,0,0,0,BLUE03); SetShotDataA(3,1,speed2[i],0,0,speed2[i],speed2[i],BLUE32); FireShot(3); SetShotDirectionType(ABSOLUTE); frame=0; } } }Main3; task Main4 { frame2++; if(frame2==350){ ascent(let i in 0..5)loop{ SetShotDirectionType(PLAYER); CreateShotA(4,GetCenterX+200,GetCenterY-220,0); SetShotDataA(4,0,0,0,0,0,0,BLUE03); SetShotDataA(4,1,speed2[i],0,0,speed2[i],speed2[i],BLUE32); FireShot(4); SetShotDirectionType(ABSOLUTE); frame2=0; } } }Main4; task Main5 { frame3++; if(frame3==400){ ascent(let i in 0..5)loop{ SetShotDirectionType(PLAYER); CreateShotA(5,GetCenterX+200,GetCenterY-220,0); SetShotDataA(5,0,0,0,0,0,0,BLUE03); SetShotDataA(5,1,speed2[i],0,0,speed2[i],speed2[i],BLUE32); FireShot(5); SetShotDirectionType(ABSOLUTE); frame3=0; } } }Main5; task Main6 { frame4++; if(frame4==450){ ascent(let i in 0..5)loop{ SetShotDirectionType(PLAYER); CreateShotA(6,GetCenterX+200,GetCenterY-220,0); SetShotDataA(6,0,0,0,0,0,0,BLUE03); SetShotDataA(6,1,speed2[i],0,0,speed2[i],speed2[i],BLUE32); FireShot(6); SetShotDirectionType(ABSOLUTE); frame4=0; } } }Main6; task Main7 { frame5++; if(frame5==500){ ascent(let i in 0..5)loop{ SetShotDirectionType(PLAYER); CreateShotA(7,GetCenterX+200,GetCenterY-220,0); SetShotDataA(7,0,0,0,0,0,0,BLUE03); SetShotDataA(7,1,speed2[i],0,0,speed2[i],speed2[i],BLUE32); FireShot(7); SetShotDirectionType(ABSOLUTE); frame5=0; } } }Main7; } @MainLoop { SetCollisionA(GetX, GetY, 24); SetCollisionB(GetX, GetY, 24); yield; } @DrawLoop{DrawGraphic(GetX, GetY);} @Finalize{DeleteGraphic("script\img\ExRumia.png");} }