BananaCupcake

Untitled

Jul 8th, 2017
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["Test 1-6"]
  4. #Text["???"]
  5.  
  6. #include "script/default_system/Shot/ZUNShot_Const.txt"
  7.  
  8. let objBoss;
  9.  
  10. @Event{
  11. alternative(GetEventType())
  12. case(EV_REQUEST_LIFE){
  13. SetScriptResult(3500);
  14. }
  15. case(EV_REQUEST_TIMER){
  16. SetScriptResult(30);
  17. }
  18. case(EV_REQUEST_SPELL_SCORE){
  19. SetScriptResult(2300000);
  20. }
  21. }
  22.  
  23. @Initialize{
  24. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  25. ObjEnemy_Regist(objBoss);
  26. let imgBoss = GetCurrentScriptDirectory() ~ "shikieiki.png.png";
  27. ObjPrim_SetTexture(objBoss, imgBoss);
  28. ObjSprite2D_SetSourceRect(objBoss, 0, 0, 148, 125);
  29. ObjSprite2D_SetDestCenter(objBoss);
  30. ObjMove_SetDestAtFrame(objBoss, GetCenterX() , 60, 60);
  31.  
  32. TFinalize;
  33. MainTask;
  34. }
  35.  
  36. @MainLoop{
  37. ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
  38. ObjEnemy_SetIntersectionCircleToPlayer(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 24);
  39. yield;
  40. }
  41.  
  42. task MainTask{
  43. while(ObjEnemy_GetInfo(objBoss,INFO_LIFE) > 0){
  44. ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60);
  45. wait(80);
  46. let objLaser = CreateCurveLaserA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 5, GetAngleToPlayer(objBoss),
  47. 60, 20, 33, 10);
  48. ObjCrLaser_SetTipDecrement(objLaser, 1); //make the tip of the laser visible
  49. yield;
  50. }
  51. }
  52.  
  53. task TFinalize {
  54. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  55. Obj_Delete(objBoss);
  56. DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
  57. SetAutoDeleteObject(true);
  58. CloseScript(GetOwnScriptID());
  59. return;
  60. }
  61.  
  62. function GetCenterX() {
  63. return GetStgFrameWidth() / 2;
  64. }
  65.  
  66. function GetCenterY(){
  67. return GetStgFrameHeight() / 2;
  68. }
  69.  
  70. function wait(n){
  71. loop(n){yield;}
  72. }
RAW Paste Data