Advertisement
Guest User

Shotsheet Test

a guest
Oct 29th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #ScriptVersion[3]
  3. #Title["Shotsheet Test"]
  4. #Text[""]
  5.  
  6. #include ".\Var_Shot.txt"
  7.  
  8. let CSD = GetCurrentScriptDirectory;
  9.  
  10. let objBoss;
  11.  
  12. let bossX;
  13. let bossY;
  14. let CenterX = GetStgFrameWidth/2;
  15. let CenterY = GetStgFrameHeight/2;
  16.  
  17. let Finish = false;
  18. let ID = 1;
  19.  
  20. @Initialize{
  21. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  22. ObjEnemy_Regist(objBoss);
  23.  
  24. ObjMove_SetPosition(objBoss,CenterX,CenterY);
  25.  
  26. TMain;
  27. }
  28.  
  29. @Event{
  30. alternative(GetEventType)
  31. case(EV_REQUEST_LIFE){ SetScriptResult(1000);}
  32. }
  33.  
  34. @MainLoop{
  35. bossX = ObjMove_GetX(objBoss);
  36. bossY = ObjMove_GetY(objBoss);
  37.  
  38. ObjEnemy_SetIntersectionCircleToShot(objBoss,bossX,bossY,24);
  39. ObjEnemy_SetIntersectionCircleToPlayer(objBoss,bossX,bossY,24);
  40.  
  41. if(ObjEnemy_GetInfo(objBoss,INFO_LIFE)<=0){
  42. Obj_Delete(objBoss);
  43. CloseScript(GetOwnScriptID);
  44. return;
  45. }
  46.  
  47. yield;
  48. }
  49.  
  50. @Finalize{
  51.  
  52. }
  53.  
  54. task TMain{
  55. wait(60);
  56. TLaser;
  57. loop{
  58. if(Finish){
  59. TShot;
  60. break;
  61. }
  62. yield;
  63. }
  64. loop{
  65. if(ID==417){
  66. wait(240);
  67. Obj_Delete(objBoss);
  68. CloseScript(GetOwnScriptID);
  69. }
  70. }
  71. }
  72.  
  73. task TLaser{
  74. TFireSL(ID);
  75. wait(2400);
  76. ID+=16;
  77. TFireSL(ID);
  78. wait(2400);
  79. Finish = true;
  80. }
  81.  
  82. task TShot{
  83. while(ID<=417){
  84. TFireS(ID);
  85. ID+=16;
  86. wait(360);
  87. }
  88. }
  89.  
  90. task TFireSL(let ShotVar){
  91. ascent(i in 0..16){
  92. CreateStraightLaserA1(bossX,bossY,i*22.5,600,20,300,ST_LASER_RED,120); //I'm using two different methods here and in the next task to demonstrate what I tried so far.
  93. wait(120);
  94. }
  95. }
  96.  
  97. task TFireS(let ShotVar){
  98. loop(10){
  99. ascent(i in 0..16){
  100. CreateShotA1(bossX,bossY,1,i*22.5,i+ShotVar,30);
  101. }
  102. wait(30);
  103. }
  104. }
  105.  
  106. function wait(w){ loop(w){ yield;}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement