Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script_enemy_main{
- //GetArgument: Difficulty ("V", "E", "N", "H", "L", "O")
- #include_function ".\..\FxnList.txt"
- let count = -30;
- let angle = 0;
- let angle2 = 180;
- let bullet = GetPreviousScriptDirectory~"\sound\bullet.wav";
- let ZUNbullet = GetPreviousScriptDirectory~"supershot.txt";
- let sprite = GetPreviousScriptDirectory~"\system\Pichu.png";
- //let vanishtime = 1200;
- let item = 0;
- let Xmin = 0; let Xmax = 448; let Ymin = 0; let Ymax = 480;
- //Made Feb 28, 2013
- @Initialize{
- LoadGraphic(sprite);
- LoadUserShotData(ZUNbullet);
- SetLife(100);
- LoadSE(bullet);
- }
- @MainLoop{
- SetCollisionA(GetX, GetY, 32);
- SetCollisionB(GetX, GetY, 24);
- if(GetArgument == "V" && count % 30 == 0){
- CreateShot01(GetX, GetY, 1, GetAngleToPlayer, 37, 3);
- PlaySE(bullet);
- }
- if(GetArgument == "E" && count % 30 == 0){
- CreateShot01(GetX, GetY, 1.5, GetAngleToPlayer, 37, 3);
- PlaySE(bullet);
- }
- if(GetArgument == "N" && count % 20 == 0){
- ascent(i in 0..3){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
- PlaySE(bullet);
- }
- if(GetArgument == "H" && count % 20 == 0){
- ascent(i in 0..4){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
- PlaySE(bullet);
- }
- if(GetArgument == "L" && count % 15 == 0){
- ascent(i in 0..5){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
- PlaySE(bullet);
- }
- if(GetArgument == "O" && count % 12 == 0){
- ascent(i in 0..6){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
- PlaySE(bullet);
- }
- if(GetX < Xmin || GetX > Xmax || GetY < Ymin || GetY > Ymax){
- item = 1;
- VanishEnemy;
- }
- //if(vanishtime == 0) {item = 1; VanishEnemy;}else{vanishtime--;}
- count++;
- yield;
- }
- @DrawLoop{
- SetTexture(sprite);
- if(GetAngle>315&&GetAngle<=45){SetGraphicRect(61, 16, 79, 42);} //Rt
- if(GetAngle>45&&GetAngle<=135){SetGraphicRect(19, 17, 41, 41);} //Down
- if(GetAngle>135&&GetAngle<=225){SetGraphicRect(81, 16, 99, 42);}//Left
- if(GetAngle>225&&GetAngle<=315){SetGraphicRect(40, 16, 58, 39);}//Up
- SetAlpha(250);
- SetGraphicAngle(0, 0, 0);
- SetGraphicScale(1, 1);
- DrawGraphic(GetX,GetY);
- }
- @Finalize{
- if(item==0){
- loop(1){
- CreateItem(ITEM_SCORE, GetX + rand(-15,15), GetY + rand(-15,15));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment