Guest User

Untitled

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