BananaCupcake

.

Jun 30th, 2017
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["Test 1-4"]
  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(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. ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60);
  44. wait(50);
  45. CreateLooseLaserA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3, GetAngleToPlayer(objBoss), 22, 398, 44, 430);
  46. }
  47.  
  48. task TFinalize {
  49. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  50. Obj_Delete(objBoss);
  51. DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
  52. SetAutoDeleteObject(true);
  53. CloseScript(GetOwnScriptID());
  54. return;
  55. }
  56.  
  57. function GetCenterX() {
  58. return GetStgFrameWidth() / 2;
  59. }
  60.  
  61. function GetCenterY(){
  62. return GetStgFrameHeight() / 2;
  63. }
  64.  
  65. function wait(n){
  66. loop(n){yield;}
  67. }
RAW Paste Data