#東方弾幕風 #Title[テストスクリプト] #Text[テストスクリプト] #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); task Main { //Y座標を適当に指定 let yTable = [ -220, -210, -200, -190,-180, -170, -160, -150, -140, -130, -120, -110, -100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, +10, +20, +30, +40, +50, +60, +70, +80, +90, +100, +110, +120, +130, +140, +150, +160, +170, +180, +190, +200, +210, +220]; let rTable = [ 20,10,20,40,80,120,150,160,150,120,80,40,20,10, 20,10,20,40,80,120,150,160,150,120,80,40,20,10, 20,10,20,40,80,120,150,160,150,120,80,40,20,10, 20,10,20]; ascent( let i in 0..45) loop { //格納座標が45個なので45個作れる…?(多分) CreateLaserA(0, GetCenterX-200, GetCenterY+yTable[i], rTable[i], 10, RED11, 10); //0フレーム時のものがないといけないような感じがするので //0フレーム状態のものを入れてみる SetLaserDataA(0,0,0,0,0,0,0); //発射 FireShot(0); } } Main; } @MainLoop{SetCollisionA(GetX, GetY, 24);SetCollisionB(GetX, GetY, 24);yield;} @DrawLoop{DrawGraphic(GetX, GetY);} @Finalize{DeleteGraphic("script\img\ExRumia.png");} }