BananaCupcake

Untitled

Jun 27th, 2017
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["Test 1-3"]
  4. #Text["???"]
  5.  
  6. #include "script/default_system/Default_ShotConst.txt"
  7.  
  8. let objBoss;
  9.  
  10. @Event{
  11. alternative(GetEventType())
  12. case(EV_REQUEST_LIFE){
  13. SetScriptResult(7000);
  14. }
  15. case(EV_REQUEST_TIMER){
  16. SetScriptResult(50);
  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. TFinalize;
  32. MainTask;
  33. }
  34.  
  35. @MainLoop{
  36. ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
  37. ObjEnemy_SetIntersectionCircleToPlayer(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 24);
  38. yield;
  39. }
  40.  
  41. task MainTask{
  42. ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60)
  43. wait(120);
  44. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  45. CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), rand(2, 5), rand(0, 360), DS_KNIFE_KOUMA_SKY, 20);
  46. yield;
  47. }
  48. }
  49.  
  50. task TFinalize {
  51. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  52. Obj_Delete(objBoss);
  53. DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
  54. SetAutoDeleteObject(true);
  55. CloseScript(GetOwnScriptID());
  56. return;
  57. }
  58.  
  59. function GetCenterX(){
  60. return GetStgFrameWidth() / 2;
  61. }
  62.  
  63. function GetCenterY(){
  64. return GetStgFrameHeight() / 2;
  65. }
  66.  
  67. function wait(n){
  68. loop(n){yield;}
  69. }
RAW Paste Data