Advertisement
Guest User

Untitled

a guest
Aug 5th, 2011
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1.  
  2. #TouhouDanmakufu
  3. #Title[Testing 123]
  4. #Text[Don't ask]
  5. #Image[]
  6. #BGM[F:\New Folder\script\GcbcSrvlCnst]
  7. #PlayLevel[Normal]
  8. #Player[FREE]
  9. #ScriptVersion[2]
  10.  
  11.  
  12. script_enemy_main{
  13.  
  14. let Cirno = "script\tutorial\cirno.png";
  15. let cut = "script\tutorial\cirnocut.png";
  16. let bg = "script\tutorial\LAKE.png";
  17.  
  18. @Initialize{
  19. LoadGraphic(Cirno);
  20. LoadGraphic(cut);
  21. LoadGraphic(bg);
  22. SetLife(1000);
  23. SetMovePosition01(GetCenterX,GetCenterY,5);
  24. SetTimer(60);
  25. SetScore(100000);
  26.  
  27. CutIn(YOUMU,"Icicle Fall -Easy-",(cut),0,0,300,384);
  28.  
  29.  
  30. mainTask;
  31.  
  32. }
  33.  
  34.  
  35. @MainLoop{
  36. SetCollisionA(GetX,GetY,32);
  37. SetCollisionB(GetX,GetY,16);
  38. yield;
  39. }
  40.  
  41. @DrawLoop{
  42.  
  43. // data for the boss
  44. SetTexture(Cirno);
  45. SetGraphicRect(0,0,100,100);
  46. SetGraphicScale(0.5,0.5);
  47. SetGraphicAngle(2,2,2);
  48. SetRenderState(ALPHA);
  49. SetAlpha(255);
  50. DrawGraphic(GetX,GetY);
  51. }
  52.  
  53. @BackGround{
  54. SetTexture(bg);
  55. SetGraphicRect(0,0,512,512);
  56. SetGraphicScale(1,1);
  57. SetGraphicAngle(0,0,0);
  58. SetRenderState(ALPHA);
  59. SetAlpha(255);
  60. DrawGraphic(GetCenterX,GetCenterY);
  61. }
  62.  
  63.  
  64. @Finalize{
  65. // Delete the image from memory
  66. DeleteGraphic(Cirno);
  67. DeleteGraphic(bg);
  68. DeleteGraphic(cut);
  69.  
  70.  
  71. }
  72.  
  73.  
  74.  
  75. // main task, activates stuff
  76. task mainTask{
  77. fire;
  78. movement;
  79.  
  80. yield;}
  81. spawn;
  82.  
  83. task fire{
  84. loop{
  85. // regular createshot
  86. CreateShot01(GetEnemyX,GetEnemyY,3,GetAngleToPlayer,AQUA01,10);
  87. CreateShot01(GetEnemyX,GetEnemyY,3,GetAngleToPlayer-20,AQUA01,10); CreateShot01(GetEnemyX,GetEnemyY,3,GetAngleToPlayer+20,AQUA01,10);
  88. CreateShot01(GetEnemyX,GetEnemyY,3,25,RED12,10);
  89. CreateShot01(GetEnemyX,GetEnemyY,3,155,RED12,10);
  90. // wait 30 frames
  91. wait(30);
  92. yield;}}
  93.  
  94.  
  95.  
  96. task movement{
  97. loop{
  98. SetMovePosition01(GetCenterX-100,120,5);
  99. wait(120);
  100. SetMovePosition01(GetCenterX+100,120,5);
  101. wait(120);
  102. yield;
  103. }
  104. }
  105.  
  106.  
  107. sub spawn{
  108.  
  109. CreateEnemyFromScript"itemFam",GetEnemyX,GetEnemyY,0,0,0);
  110. }
  111.  
  112.  
  113.  
  114. //wait function
  115. function wait(w){
  116. loop(w){yield;}}
  117.  
  118.  
  119. }
  120.  
  121.  
  122. // Familiar
  123. script_enemy itemFam{
  124.  
  125. let slv = "script\tutorial\item_sake.png";
  126.  
  127. let dir = 0;
  128. let r = 80;
  129.  
  130.  
  131. @Initialize{
  132. SetLife(5000);
  133. LoadGraphic(slv);
  134. }
  135.  
  136.  
  137.  
  138. @MainLoop{
  139. SetCollisionA(GetX,GetY,16);
  140. SetCollisionB(GetX,GetY,16);
  141. yield;
  142. }
  143.  
  144. @DrawLoop{
  145. SetTexture(slv);
  146. SetGraphic(0,0,16,16);
  147. SetGraphicScale(3,3);
  148. SetGraphicAngle(0,0,0);
  149. SetRenderState(ALPHA);
  150. SetAlpha(255);
  151. DrawGraphic(GetCenterX,GetCenterY);
  152. }
  153.  
  154.  
  155. @Finalize{
  156. DeleteGraphic(slv);
  157.  
  158.  
  159. }
  160. task mainTask{
  161. loop{
  162. SetMovePosition03(GetEnemyX+r*cos(dir),GetEnemyY+r*sin(dir),20,10);
  163. dir++;
  164. yield;
  165. }}
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement