BananaCupcake

Untitled

Jun 27th, 2017
90
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(4500);
  14. }
  15. case(EV_REQUEST_TIMER){
  16. SetScriptResult(25);
  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. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  44. let obj = CreateLooseLaserA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3, GetAngleToPlayer(objBoss),
  45. (75, 18, 1025, 0);
  46.  
  47. task TFinalize {
  48. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  49. Obj_Delete(objBoss);
  50. DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
  51. SetAutoDeleteObject(true);
  52. CloseScript(GetOwnScriptID());
  53. return;
  54. }
  55.  
  56. function GetCenterX(){
  57. return GetStgFrameWidth() / 2;
  58. }
  59.  
  60. function GetCenterY(){
  61. return GetStgFrameHeight() / 2;
  62. }
  63.  
  64. function wait(n){
  65. loop(n){yield;}
  66. }
RAW Paste Data