BananaCupcake

Danmakufu Error 1

May 31st, 2017
43
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["Test"]
  4. #Text["Just another improved 1"]
  5.  
  6. let bossObj;
  7. let bossX = 0;
  8. let bossY = 0;
  9. let imgBoss = GetCurrentScriptDirectory ~ "Shikiekiki.png";
  10.  
  11. #include "script/default_system/Default_ShotConst.txt"
  12.  
  13. @Initialize {
  14. // define a boss in bossObj and register as
  15. bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  16. ObjEnemy_Regist (bossObj);
  17.  
  18. // texture the boss, set centre as true centre.
  19. ObjPrim_SetTexture(bossObj,imgBoss);
  20. ObjSprite2D_SetSourceRect(bossObj,0,0,70,100);
  21. ObjSprite2D_SetDestCenter(bossObj);
  22.  
  23. // move boss to desired x y location at desired speed
  24. ObjMove_SetDestAtSpeed(bossObj,192,120,3);
  25.  
  26. mainTask; //run mainTask
  27. }
  28.  
  29. @Event {
  30. // setting the boss timer and life
  31. alternative(GetEventType())
  32. case(EV_REQUEST_LIFE) {
  33. SetScriptResult(2000);
  34. }
  35. case(EV_REQUEST_TIMER) {
  36. SetScriptResult(70);
  37. }
  38. }
  39.  
  40. @MainLoop {
  41. bossX=ObjMove_GetX(bossObj);
  42. bossY=ObjMove_GetY(bossObj);
  43. yield;
  44. }
  45.  
  46. @Finalize {
  47.  
  48. }
  49.  
  50. //your best friend, forever
  51. function wait(w) { loop(w) { yield; } }
  52.  
  53. task mainTask {
  54. fire;
  55. }
  56.  
  57. task fire {
  58. loop{
  59. CreateShotA1(bossX,bossY,9,90,14,0);
  60. wait(60);
  61. }
  62. }
RAW Paste Data