#東方弾幕風 #Title[テストスクリプト] #Text[テストスクリプト] #ScriptVersion[2] script_enemy_main { let imgBoss = "script\img\ExRumia.png"; let frame = 0; let angleBase = 90; @Initialize { SetX(GetCenterX); SetY(GetClipMinY + 120); SetLife(2000); SetDamageRate(10,5); CutIn(YOUMU, "山符「チョモランヴォルケイノ」", "", 0, 0, 0, 0); LoadGraphic(imgBoss); SetTexture(imgBoss); SetGraphicRect(0, 0, 63, 63); } @MainLoop { SetCollisionA(GetX, GetY, 24); SetCollisionB(GetX, GetY, 24); frame++; if(frame%45==0){ loop(36){ CreateShot01(GetX,GetY,1,angleBase,GREEN21,10); angleBase+=10; } } angleBase=GetAngleToPlayer; if(frame%120==0) { if(GetEnemyLife<=1000){ nway(angleBase, rand(100,110)); } nway(angleBase, rand(140,150)); angleBase+=10; loop(35){ CreateShot01(GetX,GetY,2,angleBase,RED21,10); angleBase+=10; } } } @DrawLoop { DrawGraphic(GetX, GetY); } @Finalize { DeleteGraphic(imgBoss); } function nway(let angle,let time) { let shot=0; let shot1 =1; let shot2=2; let shot3=3; CreateShotA(shot,GetX,GetY,10); SetShotDataA(shot,0,2,angle,0,0,2,RED21); loop(36){ CreateShotA(shot1,0,0,5); SetShotDataA(shot1,0,4,angle,0,0,0,RED02); loop(10){ CreateShotA(shot2,0,0,5); SetShotDataA(shot2,0,2,angle+rand(-5,5),0,0,0,RED01); loop(10){ CreateShotA(shot3,0,0,5); SetShotDataA(shot3,0,2,angle+rand(-5,5),0,0,0,RED05); SetShotKillTime(shot3,10); AddShot(10,shot2,shot3,0); } SetShotKillTime(shot2,11); AddShot(10,shot1,shot2,0); } SetShotKillTime(shot1,11); AddShot(time,shot,shot1,0); angle+=10; } SetShotKillTime(shot,time+1); FireShot(shot); } }