Mewkyuu

Untitled

Jul 7th, 2011
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[Idea 1 [S1_B 3S]]
  3. #Text[Stage 1
  4. Boss
  5. Spell #3]
  6. #BackGround[Default]
  7. #Player[FREE]
  8. #ScriptVersion[2]
  9.  
  10. script_enemy_main {
  11. let imgExRumia="script\img\ExRumia.png";
  12. let imgExRumiaBack ="script\ExRumia\img\ExRumiaBack.png";
  13. @Initialize {
  14. SetDamageRate(0,0);
  15. LoadGraphic(imgExRumia);
  16. LoadGraphic(imgExRumiaBack);
  17. TMain;
  18. }
  19.  
  20. @MainLoop {
  21. SetCollisionA(GetX,GetY,32);
  22. SetCollisionB(GetX,GetY,24);
  23. yield;
  24. }
  25.  
  26. @Finalize {
  27. DeleteGraphic(imgExRumia);
  28. DeleteGraphic(imgExRumiaBack);
  29. }
  30.  
  31. @BackGround {
  32. SetTexture(imgExRumiaBack);
  33. SetGraphicRect(0,0,384,448);
  34. DrawGraphic(GetCenterX, GetCenterY);
  35. }
  36.  
  37. let exrumiaattackframe = 0;
  38. function ExRumiaAddActionFrames(frames) { exrumiaattackframe += frames; }
  39. function ExRumiaSetActionFrames(frames) { exrumiaattackframe = frames; }
  40. @DrawLoop {
  41. SetTexture(imgExRumia);
  42. SetGraphicRect(0,0,64,64);
  43. if(GetSpeedX == 0) {
  44. if(exrumiaattackframe == 0) {
  45. SetGraphicRect(0,0,64,64);
  46. } else {
  47. SetGraphicRect(65,0,128,64);
  48. exrumiaattackframe--;
  49. }
  50. if(exrumiaattackframe < 0){
  51. exrumiaattackframe = 0;
  52. }
  53. } else if(GetSpeedX < 0) {
  54. SetGraphicRect(129,0,192,64);
  55. } else if(GetSpeedX > 0) {
  56. SetGraphicRect(193,0,256,64);
  57. }
  58. DrawGraphic(GetX, GetY);
  59. }
  60.  
  61. function wait(let frames) { loop(frames) { yield; } }
  62. function waitInvincible(let frames) { loop(frames) { SetInvincibility(2); yield; } }
  63.  
  64. task TMain {
  65. SetX(GetClipMinX); SetY(0);
  66. SetLife(10000);
  67. SetTimer(55);
  68. SetInvincibility(120);
  69. SetMovePosition03(GetCenterX, GetCenterY/2, 9, 17);
  70. waitInvincible(45);
  71. SetText("Greenhouse "\""Wild Planting Dance"\"); SetScore(1200000);
  72. MagicCircle(false); SetEnemyMarker(true);
  73. SetEffectForZeroLife(150, 0, 0);
  74. SetShotAutoDeleteClip(200, 200, 200, 30);
  75. waitInvincible(120);
  76. uno(GetAngleToPlayer, rand(0,360), RED01);
  77. }
  78. task uno(angle,angolo,g){let gr=0;
  79. let obj=Obj_Create(OBJ_LASER);
  80. Obj_SetPosition(obj, GetCenterX, GetCenterY);
  81. Obj_SetAngle(obj, angle+gr);
  82. ObjShot_SetGraphic(obj, g);
  83. ObjShot_SetDelay (obj, 30);
  84. ObjShot_SetBombResist (obj, true);
  85. ObjLaser_SetLength(obj, 200);
  86. ObjLaser_SetWidth (obj, 15);
  87. ObjLaser_SetSource(obj, false);
  88. gr+=1/60;while(Obj_BeDeleted(obj)==false) {
  89.  
  90. Obj_SetPosition(obj, Obj_GetX(obj)+(4)*cos(angolo), Obj_GetY(obj)+(4)*sin(angolo)); if(Obj_GetX(obj)<GetClipMinX) {
  91. angolo=180-angolo; }
  92. if(Obj_GetX(obj)>GetClipMaxX) {
  93. angolo=180-angolo;
  94. }
  95. if(Obj_GetY(obj)<GetClipMinY) {
  96. angolo=-angolo;
  97. }
  98. if(Obj_GetY(obj)>GetClipMaxY) {
  99. angolo=-angolo;
  100. }
  101. yield;
  102. } }
  103. }
Advertisement
Add Comment
Please, Sign In to add comment