Advertisement
Lavalake

Cutin Error

Dec 12th, 2012
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. script_enemy_main{
  2. LoadUserShotData("lib/ZUN/ZUN's shotdata.txt");
  3.  
  4. let CSD = GetCurrentScriptDirectory;
  5. let dir = 0;
  6. let Kona = CSD ~ "System\Kona_Metsuka-Dot.png";
  7. let Shot0 = GetCurrentScriptDirectory ~ "SE\Shot00.wav";
  8. let Shot1 = GetCurrentScriptDirectory ~ "SE\Shot01.wav";
  9. let Shot2 = GetCurrentScriptDirectory ~ "SE\Shot02.wav";
  10. let BG = CSD ~ "System\Spell-3.png";
  11. let CutIn = CSD ~ "System\Kona-Cut-in.png";
  12.  
  13. @Initialize{
  14. SetLife(250);
  15. SetDamageRate(10, 10);
  16. SetTimer(60);
  17. SetScore(10000);
  18. SetInvincibility(60);
  19. SetEnemyMarker(true);
  20. SetMovePosition03(GetCenterX,150,2,5);
  21. LoadGraphic(Kona);
  22. LoadGraphic(CutIn);
  23. LoadGraphic(BG);
  24. mainTask;
  25. CutIn(YOUMU,"Wind Sign "\""Dropping Hurricanes"\",CutIn,0,0,250,375);
  26. }
  27.  
  28. @MainLoop{
  29. SetCollisionA(GetX,GetY,15);
  30. SetCollisionB(GetX,GetY,15);
  31. yield;
  32. }
  33.  
  34. @DrawLoop{
  35. SetTexture(Kona);
  36. SetRenderState(ALPHA);
  37. SetAlpha(225);
  38. SetGraphicScale(1,1);
  39. SetGraphicAngle(0,0,0);
  40.  
  41. if(int(GetSpeedX())==0){
  42. SetGraphicRect(0,0,29,39);
  43. }
  44. if(int(GetSpeedX())>0){
  45. SetGraphicRect(30,0,59,39);
  46. }
  47. if(int(GetSpeedX())<0){
  48. SetGraphicRect(60,0,89,39);
  49. }
  50. DrawGraphic(GetX,GetY);
  51. }
  52.  
  53. @BackGround{
  54. SetTexture(BG);
  55. SetRenderState(ADD);
  56. SetGraphicRect(0,0,500,500);
  57. SetGraphicScale(1,1);
  58. SetGraphicAngle(0,0,0);
  59. DrawGraphic(GetCenterX,GetCenterY);
  60.  
  61. }
  62.  
  63. @Finalize{
  64. DeleteGraphic(Kona);
  65. DeleteGraphic(BG);
  66. DeleteGraphic(CutIn);
  67. }
  68.  
  69.  
  70. // main task, activates stuff.
  71. task mainTask{
  72. wait(60);
  73. yield;
  74. fire;
  75. fire2;
  76. }
  77.  
  78. task fire{
  79. loop{
  80. cyclone(rand(1,400),0);
  81. wait(80);
  82. cyclone1(rand(1,400),0);
  83. wait(80);
  84. }
  85. }
  86.  
  87. task fire2{
  88. loop(20){
  89. PlaySE(Shot0);
  90. Bullet2(GetX,GetY,3,dir);
  91. dir+=360/20;
  92. }
  93. wait(60);
  94. dir++;
  95. dir++;
  96. dir++;
  97. dir++;
  98. dir++;
  99. dir++;
  100. dir++;
  101. dir++;
  102. dir++;
  103. fire2;
  104. }
  105.  
  106. task Bullet(x, y, v, angle) {
  107. let obj=Obj_Create(OBJ_SHOT);
  108.  
  109. Obj_SetPosition(obj, x, y);
  110. Obj_SetAngle(obj, angle);
  111. Obj_SetSpeed(obj, v);
  112. ObjShot_SetGraphic(obj, 7);
  113. ObjShot_SetDelay (obj, 20);
  114. ObjShot_SetBombResist (obj, true);
  115.  
  116. while(Obj_BeDeleted(obj)==false) {
  117. Obj_SetAngle(obj, Obj_GetAngle(obj) + 1.3);
  118. Obj_SetPosition(obj, Obj_GetX(obj), Obj_GetY(obj) + 1.4);
  119. yield;
  120. }
  121. }
  122. function cyclone(x, y){
  123. ascent(i in 0..10){
  124. ascent(k in 0..2){
  125. Bullet(x, y, 0.5*(1+k), i*40);
  126. }
  127. }
  128. }
  129.  
  130. task Bullet1(x, y, v, angle) {
  131. let obj=Obj_Create(OBJ_SHOT);
  132.  
  133. Obj_SetPosition(obj, x, y);
  134. Obj_SetAngle(obj, angle);
  135. Obj_SetSpeed(obj, v);
  136. ObjShot_SetGraphic(obj, 9);
  137. ObjShot_SetDelay (obj, 20);
  138. ObjShot_SetBombResist (obj, true);
  139.  
  140. while(Obj_BeDeleted(obj)==false) {
  141. Obj_SetAngle(obj, Obj_GetAngle(obj) - 1.3);
  142. Obj_SetPosition(obj, Obj_GetX(obj), Obj_GetY(obj) + 1.4);
  143. yield;
  144. }
  145. }
  146. function cyclone1(x, y){
  147. ascent(i in 0..10){
  148. ascent(k in 0..2){
  149. Bullet1(x, y, 0.5*(1+k), i*40);
  150. }
  151. }
  152. }
  153.  
  154. task Bullet2(x, y, v, angle) {
  155. let obj=Obj_Create(OBJ_SHOT);
  156.  
  157. Obj_SetPosition(obj, x, y);
  158. Obj_SetAngle(obj, angle);
  159. Obj_SetSpeed(obj, v);
  160. ObjShot_SetGraphic(obj, 92);
  161. ObjShot_SetDelay (obj, 20);
  162. ObjShot_SetBombResist (obj, true);
  163.  
  164. }
  165.  
  166.  
  167.  
  168.  
  169. // wait function
  170. function wait(w){
  171. loop(w){ yield; }
  172. }
  173.  
  174.  
  175. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement