Guest User

Untitled

a guest
Jan 2nd, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[Random Sign 69$sjfsj2$!@#]
  3. #Text[Seiga starts throwing random bullets at you.]
  4. #Player[FREE]
  5. #ScriptVersion[2]
  6.  
  7. script_enemy_main{
  8.  
  9. let CSD = GetCurrentScriptDirectory;
  10.  
  11. let imgBoss = CSD ~"enm4.png";
  12. let cut = CSD ~ "cutin.png";
  13. let bg = CSD ~ "waterfall.png";
  14.  
  15.  
  16. let f = 0;
  17. let f2 = 0;
  18.  
  19.  
  20. @Initialize{
  21. SetLife(1000);
  22. SetTimer(60);
  23. SetScore(100000);
  24. SetMovePosition01(GetCenterX,GetCenterY,5);
  25. LoadGraphic(imgBoss);
  26. LoadGraphic(cut);
  27. LoadGraphic(bg);
  28.  
  29. CutIn(YOUMU,"Random attack! 76fsdshbgdgdnjg",cut,0,0,409,600);
  30.  
  31. mainTask;
  32. }
  33.  
  34. @MainLoop{
  35. SetCollisionA(GetX,GetY,32);
  36. SetCollisionB(GetX,GetY,14);
  37. yield;
  38. }
  39.  
  40. @DrawLoop{
  41.  
  42. // data for the boss!
  43. SetTexture(imgBoss);
  44. SetRenderState(ALPHA);
  45. SetAlpha(255);
  46. SetGraphicScale(1,1);
  47. SetGraphicAngle(0,0,0);
  48.  
  49. if(int(GetSpeedX())==0){
  50. if(f<10){ SetGraphicRect(0,0,85,80); }
  51. if(f>=10 && f<20){SetGraphicRect(85,0,170,80); }
  52. if(f>=20 && f<30){SetGraphicRect(170,0,250,80); }
  53. if(f>=30 && f<40){SetGraphicRect(250,0,330,80); }
  54.  
  55. }
  56.  
  57. if(GetSpeedX()>0){
  58.  
  59. }
  60.  
  61. if(GetSpeedX()<0){
  62.  
  63. }
  64.  
  65. DrawGraphic(GetX,GetY);
  66. f++;
  67. if(f==40){f=0;}
  68.  
  69. }
  70.  
  71. @BackGround{
  72. SetTexture(bg);
  73. SetRenderState(ALPHA);
  74. SetAlpha(255);
  75. SetGraphicRect(0,0,1600,1200);
  76. SetGraphicScale(1,1);
  77. SetGraphicAngle(0,0,0);
  78. DrawGraphic(GetCenterX,GetCenterY);
  79. }
  80.  
  81. @Finalize{
  82. // deletes image when boss defeated
  83. DeleteGraphic(imgBoss);
  84. DeleteGraphic(cut);
  85. DeleteGraphic(bg);
  86. }
  87.  
  88.  
  89. task mainTask{
  90. yield;
  91. fire;
  92. Superbullet;
  93.  
  94. }
  95.  
  96.  
  97. task fire{
  98. loop{
  99. Superbullet(GetEnemyX,GetEnemyY,5,GetAngleToPlayer,AQUA32,60);
  100. Superbullet(GetEnemyX,GetEnemyY,5,GetAngleToPlayer-50,AQUA22,60);
  101. Superbullet(GetEnemyX,GetEnemyY,5,GetAngleToPlayer+43,AQUA21,60);
  102. Superbullet(GetEnemyX,GetEnemyY,5,GetAngleToPlayer-63,AQUA11,60);
  103. Superbullet(GetEnemyX,GetEnemyY,5,GetAngleToPlayer+54,BLUE22,60);
  104. Superbullet(GetEnemyX,GetEnemyY,5,GetAngleToPlayer-64,PURPLE22,60);
  105. Superbullet(GetEnemyX,GetEnemyY,5,GetAngleToPlayer+32,ORANGE22,60);
  106.  
  107. wait(30)
  108. yield;
  109. }
  110. }
  111.  
  112. task Superbullet(x,y,v,dir,graphic,delay){
  113. let obj - obj_create(OBJ_SHOT);
  114.  
  115. Obj_SetPosition(obj,3,5);
  116. Obj_SetSpeed(obj,0.9);
  117. Obj_SetAngle(obj,54);
  118. Obj Shot_Setgraphic(obj,AQUA01);
  119. Obj Shot_SetDelay(obj,30);
  120.  
  121. }
  122. // wait function
  123. function wait(w){
  124. loop(w){yield;}
  125. }
  126.  
  127. }
Advertisement
Add Comment
Please, Sign In to add comment