Advertisement
Guest User

Untitled

a guest
Nov 18th, 2012
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[Cirno - Circ]
  3. #Text[Baka!]
  4. #BGM[Theme]
  5. #Player[FREE]
  6. #ScriptVersion[2]
  7. script_enemy_main{
  8.  
  9.  
  10. let CSD = GetCurrentScriptDirectory;
  11.  
  12. let imgBoss = CSD ~ "system\enmyboss.png";
  13. let cut = CSD ~ "system\cirnocut.png";
  14. let bg = CSD ~ "system\lake.png";
  15.  
  16. @Initialize{
  17. SetLife(6000);
  18. SetTimer(99);
  19. SetScore(100000);
  20. SetMovePosition01(GetCenterX,GetCenterY,5);
  21.  
  22. LoadGraphic(imgBoss);
  23. LoadGraphic(cut);
  24. LoadGraphic(bg);
  25. CutIn(YOUMU,"Circle Spawn - 'Just a Circle'",cut,0,0,300,384);
  26.  
  27.  
  28.  
  29. mainTask; }
  30.  
  31.  
  32. @MainLoop{
  33. SetCollisionA(GetX,GetY,32);
  34. SetCollisionB(GetX,GetY,17);
  35.  
  36. yield;
  37. }
  38. @DrawLoop{
  39.  
  40. SetTexture(imgBoss);
  41. SetRenderState(ALPHA);
  42. SetAlpha(255);
  43. SetGraphicRect(91,39,63,85);
  44. SetGraphicScale(1,1);
  45. SetGraphicAngle(0,0,0);
  46. DrawGraphic(GetX,GetY);
  47. }
  48.  
  49. @BackGround{
  50. SetTexture(bg);
  51. SetRenderState(ALPHA);
  52. SetAlpha(255);
  53. SetGraphicRect(0,0,512,512);
  54. SetGraphicScale(1,1);
  55. SetGraphicAngle(0,0,0);
  56. DrawGraphic(GetCenterX,GetCenterY);
  57. }
  58.  
  59.  
  60. @Finalize{
  61. // delete the image from memory
  62. DeleteGraphic(imgBoss);
  63. DeleteGraphic(cut);
  64. DeleteGraphic(bg);
  65. }
  66.  
  67.  
  68.  
  69. //main task, activates stuff.
  70. task mainTask{
  71. yield;
  72. fire;
  73. movement;
  74.  
  75. }
  76.  
  77. task movement{
  78. loop{
  79. SetMovePosition01(GetPlayerX, GetPlayerY, 15);
  80. wait(90);
  81.  
  82. yield;}
  83.  
  84.  
  85. }
  86.  
  87. task fire{
  88. let x = 0;
  89. let dir = 0;
  90. loop{
  91. while(x<36){
  92. CreateShotA(1,GetEnemyX,GetEnemyY,30);
  93.  
  94. SetShotDataA(1,0,0,dir, 0, 0, 0, AQUA01);
  95.  
  96.  
  97. SetShotDataA(1,60,2,dir, 0.2, 0, 2, AQUA01);
  98.  
  99. FireShot(1);
  100.  
  101. dir+=360/36
  102.  
  103. x++;
  104. }
  105. x=0;
  106. dir=0;
  107. wait(60);
  108. yield;}
  109.  
  110.  
  111.  
  112. }
  113.  
  114. // wait function
  115. function wait(w){
  116. loop(w){yield;}
  117. }
  118.  
  119. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement