Advertisement
Guest User

Stuff

a guest
Aug 20th, 2011
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[Fallen Sign - Zombie Driver -]
  3. #Text[o3o]
  4. #Player[FREE]
  5. #ScriptVersion[2]
  6. #BGM[.\bgm\th13_07.mp3]
  7.  
  8. script_enemy_main{
  9. #include_function ".\system\function_cutin.txt";
  10.  
  11. let CSD = GetCurrentScriptDirectory;
  12. let imgboss = CSD ~ "system\enemy.png";
  13. let cut = CSD ~ "system\Front.png";
  14. let bg1 = CSD ~ "system\cdbg03a.png";
  15. let bg2 = CSD ~ "system\cdbg03b.png";
  16.  
  17. let slide=0;
  18.  
  19.  
  20.  
  21. @Initialize{
  22. SetLife(1000);
  23. SetDamageRate(25,15);
  24. SetTimer(52);
  25. SetScore(100000);
  26. SetMovePosition01(GetCenterX,GetCenterY,5);
  27.  
  28. LoadGraphic(imgboss);
  29. LoadGraphic(cut);
  30. LoadGraphic(bg1);
  31. LoadGraphic(bg2);
  32.  
  33. cutin("NAZRIN","Fallen Sign - Zombie Driver -",cut,0,0,238,480);
  34.  
  35. mainTask;
  36.  
  37.  
  38. }
  39.  
  40. @MainLoop{
  41. SetCollisionA(GetX,GetY,16);
  42. SetCollisionB(GetX,GetY,8);
  43.  
  44.  
  45. yield;
  46.  
  47.  
  48. }
  49.  
  50. @DrawLoop{
  51.  
  52. SetTexture(imgboss);
  53. SetRenderState(ALPHA);
  54. SetAlpha(255);
  55. SetGraphicRect(0,0,52,82);
  56. SetGraphicScale(1,1);
  57. SetGraphicAngle(0,0,0);
  58. DrawGraphic(GetX,GetY);
  59.  
  60.  
  61. }
  62.  
  63. @BackGround{
  64.  
  65. SetTexture(bg1);
  66. SetRenderState(ALPHA);
  67. SetAlpha(255);
  68. SetGraphicRect(0,0,384,448);
  69. SetGraphicScale(1.5,1.5);
  70. SetGraphicAngle(0,0,0);
  71. DrawGraphic(GetCenterX,GetCenterY);
  72.  
  73. SetTexture(bg2);
  74. SetRenderState(ADD);
  75. SetGraphicRect(0,0,2000000,2000000);
  76. SetGraphicScale(0.5,0.5);
  77. SetGraphicAngle(0,0,0);
  78. DrawGraphic(GetCenterX+slide,GetCenterY+slide);
  79.  
  80. slide+=2;
  81.  
  82.  
  83. }
  84.  
  85. @Finalize{
  86.  
  87. DeleteGraphic(imgboss);
  88. DeleteGraphic(cut);
  89. DeleteGraphic(bg1);
  90. DeleteGraphic(bg2);
  91.  
  92. }
  93.  
  94. task mainTask{
  95. wait(80);
  96. yield;
  97. movement;
  98. fire2;
  99.  
  100. }
  101.  
  102. task movement{
  103.  
  104. loop{
  105.  
  106. SetMovePositionRandom01(60,30,10,GetCenterX-120,GetCenterY-100,GetCenterX+120,GetCenterY-100);
  107. wait(20);
  108. PlaySE(CSD ~ "sfx\charging.wav");
  109. SetColor(128,128,255);
  110. Concentration01(80);
  111. SetColor(255,255,255);
  112. wait(20);
  113. fire;
  114. wait(120);
  115. yield;
  116.  
  117. }
  118.  
  119. }
  120.  
  121.  
  122. task fire2{
  123. let x = 0;
  124. let dir = 0;
  125.  
  126. loop{
  127. while(x<36){
  128. CreateShotA(1,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
  129. SetShotDataA(1,0,1,dir,-0.2,0,1,AQUA31);
  130. FireShot(1);
  131.  
  132. CreateShotA(2,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
  133. SetShotDataA(2,0,1,dir,0.2,0,1,PURPLE31);
  134. FireShot(2);
  135.  
  136. dir+=350/36;
  137.  
  138. x++;
  139. }
  140.  
  141.  
  142. x = 0;
  143. dir = 0;
  144. wait(90);
  145.  
  146. yield;
  147.  
  148. }
  149.  
  150. }
  151.  
  152.  
  153. task fire{
  154. let x = 0;
  155. let dir = rand_int(0,359);
  156. PlaySE(CSD ~ "sfx\shot.wav");
  157. while(x<16){
  158. kunai(GetEnemyX+60*cos(dir),GetEnemyY+60*cos(dir),3,dir,PURPLE03,0);
  159. dir+=22.5;
  160. x++;
  161.  
  162. }
  163.  
  164. }
  165.  
  166.  
  167.  
  168.  
  169. task kunai(x,y,v,dir,graphic,delay){
  170. let Obj = Obj_Create(OBJ_SHOT);
  171.  
  172. Obj_SetPosition(Obj,x,y);
  173. Obj_SetSpeed(Obj,v);
  174. Obj_SetAngle(Obj,dir);
  175. ObjShot_SetGraphic(Obj,graphic);
  176. ObjShot_SetDelay(Obj,delay);
  177. ObjShot_SetBombResist(Obj,true);
  178.  
  179. while(!Obj_BeDeleted(Obj)){
  180.  
  181. wait(10);
  182. Obj_SetSpeed(Obj,0);
  183. Concentration02(15);
  184. wait(20);
  185. ObjShot_SetGraphic(Obj,YELLOW31);
  186. PlaySE(CSD ~ "sfx\shot2.wav");
  187. loop(5){
  188.  
  189. CreateLaserC(1,Obj_GetX(Obj),Obj_GetY(Obj),400,200,YELLOW01,0);
  190. SetLaserDataC(1,0,5,GetAngleToPlayer,0.2,0,0);
  191.  
  192. }
  193.  
  194. wait(30);
  195. ObjShot_FadeDelete(Obj);
  196. yield;
  197.  
  198. }
  199.  
  200.  
  201. }
  202.  
  203. function wait(w){
  204. loop(w){yield;}
  205.  
  206. }
  207.  
  208.  
  209.  
  210. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement