Guest User

Untitled

a guest
Mar 1st, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. script_enemy_main{
  2. //GetArgument: Difficulty ("V", "E", "N", "H", "L", "O")
  3. #include_function ".\..\FxnList.txt"
  4. let count = -30;
  5. let angle = 0;
  6. let angle2 = 180;
  7. let bullet = GetPreviousScriptDirectory~"\sound\bullet.wav";
  8. let ZUNbullet = GetPreviousScriptDirectory~"supershot.txt";
  9. let sprite = GetPreviousScriptDirectory~"\system\Pichu.png";
  10. //let vanishtime = 1200;
  11. let item = 0;
  12. let Xmin = 0; let Xmax = 448; let Ymin = 0; let Ymax = 480;
  13. //Made Feb 28, 2013
  14.  
  15. @Initialize{
  16. LoadGraphic(sprite);
  17. LoadUserShotData(ZUNbullet);
  18. SetLife(100);
  19. LoadSE(bullet);
  20. }
  21.  
  22. @MainLoop{
  23. SetCollisionA(GetX, GetY, 32);
  24. SetCollisionB(GetX, GetY, 24);
  25. if(GetArgument == "V" && count % 30 == 0){
  26. CreateShot01(GetX, GetY, 1, GetAngleToPlayer, 37, 3);
  27. PlaySE(bullet);
  28. }
  29. if(GetArgument == "E" && count % 30 == 0){
  30. CreateShot01(GetX, GetY, 1.5, GetAngleToPlayer, 37, 3);
  31. PlaySE(bullet);
  32. }
  33. if(GetArgument == "N" && count % 20 == 0){
  34. ascent(i in 0..3){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
  35. PlaySE(bullet);
  36. }
  37. if(GetArgument == "H" && count % 20 == 0){
  38. ascent(i in 0..4){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
  39. PlaySE(bullet);
  40. }
  41. if(GetArgument == "L" && count % 15 == 0){
  42. ascent(i in 0..5){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
  43. PlaySE(bullet);
  44. }
  45. if(GetArgument == "O" && count % 12 == 0){
  46. ascent(i in 0..6){CreateShot01(GetX, GetY, 1+i/3, GetAngleToPlayer, 37, 3);}
  47. PlaySE(bullet);
  48. }
  49. if(GetX < Xmin || GetX > Xmax || GetY < Ymin || GetY > Ymax){
  50. item = 1;
  51. VanishEnemy;
  52. }
  53. //if(vanishtime == 0) {item = 1; VanishEnemy;}else{vanishtime--;}
  54. count++;
  55. yield;
  56. }
  57.  
  58. @DrawLoop{
  59. SetTexture(sprite);
  60. if(GetAngle>315&&GetAngle<=45){SetGraphicRect(61, 16, 79, 42);} //Rt
  61. if(GetAngle>45&&GetAngle<=135){SetGraphicRect(19, 17, 41, 41);} //Down
  62. if(GetAngle>135&&GetAngle<=225){SetGraphicRect(81, 16, 99, 42);}//Left
  63. if(GetAngle>225&&GetAngle<=315){SetGraphicRect(40, 16, 58, 39);}//Up
  64. SetAlpha(250);
  65. SetGraphicAngle(0, 0, 0);
  66. SetGraphicScale(1, 1);
  67. DrawGraphic(GetX,GetY);
  68. }
  69.  
  70. @Finalize{
  71. if(item==0){
  72. loop(1){
  73. CreateItem(ITEM_SCORE, GetX + rand(-15,15), GetY + rand(-15,15));
  74. }
  75. }
  76. }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment