Advertisement
Guest User

Comment Debug

a guest
Jan 25th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1.  
  2. #TouhouDanmakufu[Single]
  3. #ScriptVersion[3]
  4. #Title["Comment Debug"]
  5. #Text["test1"]
  6. #System["script/Lunatic_Home_Front_v0.2/LHF_System/Custom_System.txt"]
  7.  
  8. #include "script/default_system/Default_ShotConst.txt"
  9. #include "script/default_system/Default_Effect.txt"
  10. #include "script/Lunatic_Home_Front_v0.2/LHF_System/Function_Library/Custom_Functions.dnh"
  11. #include "script/Lunatic_Home_Front_v0.2/LHF_System/Function_Library/LHF_Effect.dnh"
  12.  
  13. /*
  14. Debugging Platform
  15.  
  16. Issue A3_M1_S1_2.dnh
  17. */
  18.  
  19.  
  20. // Global Variables
  21. let bossObj;
  22. let bossImg;
  23. let bossScene;
  24. let bossRender = true;
  25. let supportTrue = true;
  26.  
  27. @Event{
  28. alternative(GetEventType())
  29. case(EV_REQUEST_LIFE){
  30. SetScriptResult(3000);
  31. }
  32. case(EV_REQUEST_TIMER){
  33. SetScriptResult(90);
  34. }
  35. }
  36.  
  37. @Initialize{
  38. // Initialize, register and render boss
  39. bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  40. ObjEnemy_Regist(bossObj);
  41. RenderBoss;
  42.  
  43. // Load Sound Effects
  44. LoadEffectSoundObjects();
  45.  
  46. // Set boss destination coordinates for movement over 60 frames
  47. ObjMove_SetDestAtFrame(bossObj,GetCenterX(),70,60);
  48. ObjEnemy_SetDamageRate(bossObj,0,0);
  49.  
  50. // Open Fire
  51. Attack;
  52.  
  53. // Terminate script
  54. EndScript;
  55. }
  56.  
  57. @MainLoop{
  58. // Set boss hitbox detection
  59. ObjEnemy_SetIntersectionCircleToShot(bossObj,ObjMove_GetX(bossObj),ObjMove_GetY(bossObj),32);
  60. ObjEnemy_SetIntersectionCircleToPlayer(bossObj,ObjMove_GetX(bossObj),ObjMove_GetY(bossObj),24);
  61.  
  62. // Yield to allow other tasks to run
  63. yield;
  64. }
  65.  
  66. task Attack{
  67. wait(70);
  68. LaserTask();
  69. //SupportTask();
  70.  
  71.  
  72. /*
  73. while(!Obj_IsDeleted(bossObj)){
  74. wait(240);
  75. OldLaserTask();
  76. }*/
  77. }
  78.  
  79. task LaserTask(){
  80. //
  81. }
  82.  
  83. /***********************
  84.  
  85.  
  86. ************************/
  87.  
  88. task OldLaserTask(){
  89. //
  90. }
  91.  
  92. // Pick sprite for boss
  93. task RenderBoss{
  94. bossImg = GetCurrentScriptDirectory() ~ "../../LHF_Img/Test_Circle.png";
  95. ObjPrim_SetTexture(bossObj,bossImg);
  96. ObjSprite2D_SetSourceRect(bossObj,0,1,255,256);
  97. ObjSprite2D_SetDestCenter(bossObj);
  98. ObjRender_SetScaleXYZ(bossObj,0.3,0.3,1);
  99.  
  100. // If not spinning check for freezes
  101. let animframe = 0;
  102. while(!Obj_IsDeleted(bossObj)){
  103. ObjRender_SetAngleZ(bossObj,animframe);
  104. animframe += 2.5;
  105. yield;
  106. }
  107. }
  108.  
  109. task EndScript{
  110. while(ObjEnemy_GetInfo(bossObj,INFO_LIFE) > 0){
  111. yield;
  112. }
  113. // End spellcard and delete boss
  114. TExplosionA(ObjMove_GetX(bossObj),ObjMove_GetY(bossObj),10,0.9);
  115. Obj_Delete(bossObj);
  116. DeleteShotAll(TYPE_ALL,TYPE_ITEM);
  117.  
  118. // Close script after 60 frames
  119. wait(60);
  120. SetAutoDeleteObject(true);
  121. CloseScript(GetOwnScriptID());
  122. return;
  123. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement