<自機のプログラム> extends SpriteChar; function damage() { $life=$life-1; if ($life==0) {die(); appear(new Bomb($飛行機.x , $飛行機.y));} else {die(); appear(new Bomb2($飛行機.x , $飛行機.y));}} <↑この部分の命令が二度目以降おかしくなります。> zOrder=0; while(1){ if (getkey(39)>0 && x<$screenWidth-20) x+=6; if (getkey(37)>0 && x>20) x-=6; if (getkey(40)>0 && y<$screenHeight-80) y+=5; if (getkey(38)>0 && y>20) y-=6; if (getkey(32)==1) appear(new Tama(x,y,$pat_Sample+1)); update(); } <Bomb2のプログラム> extends SpriteChar; p=$pat_Sample+4; wait(5); p+=1; wait(5); p+=1; wait(5); p+=1; wait(5); appear(new 飛行機(285 , 590 ,$pat_Sample+0));       ↑自機 <敵のプログラム> extends SpriteChar; zOrder=1; teki=rnd(70)+100; tekiki=rnd(40)+teki+260; while(y-100){ x+=1; y+=2; for (t in $chars) {if (t is tama && crashTo(t) && y>0) { t.die(); die(); $score=$score+9;}} if (crashTo($飛行機)) {$HitPoint.damage敵(); die();} update();} if (x<$飛行機.x-50) vx=5; else vx=-3; while (y-100) { y+=4; x+=vx; for (t in $chars) {if (t is tama && crashTo(t) && y>0) {t.die(); die(); $score=$score+9;}} if (crashTo($飛行機)) {$HitPoint.damage敵(); die();} update();} if (x<$飛行機.x) vx=2; else vx=-2; while (y<$screenHeight && x<$screenWidth+100 && x>-100) { y+=3; x+=vx; for (t in $chars) {if (t is tama && crashTo(t) && y>0) {t.die(); die(); $score=$score+9;}} if (crashTo($飛行機)) {$HitPoint.damage敵(); die();} update();}