Guest User

Sample script

a guest
Nov 10th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #ScriptVersion[3]
  3. #Title["Shotsheet Test"]
  4. #Text[""]
  5.  
  6. let CSD = GetCurrentScriptDirectory;
  7.  
  8. let objBoss;
  9.  
  10. let bossX;
  11. let bossY;
  12. let CenterX = GetStgFrameWidth/2;
  13. let CenterY = GetStgFrameHeight/2;
  14.  
  15. @Initialize{
  16. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  17. ObjEnemy_Regist(objBoss);
  18.  
  19. ObjMove_SetPosition(objBoss,CenterX,CenterY);
  20.  
  21. LoadEnemyShotData(CSD ~ "ShotDefine.txt");
  22.  
  23. TMain;
  24. }
  25.  
  26. @Event{
  27. alternative(GetEventType)
  28. case(EV_REQUEST_LIFE){ SetScriptResult(1000);}
  29. }
  30.  
  31. @MainLoop{
  32. bossX = ObjMove_GetX(objBoss);
  33. bossY = ObjMove_GetY(objBoss);
  34.  
  35. ObjEnemy_SetIntersectionCircleToShot(objBoss,bossX,bossY,24);
  36. ObjEnemy_SetIntersectionCircleToPlayer(objBoss,bossX,bossY,24);
  37.  
  38. if(ObjEnemy_GetInfo(objBoss,INFO_LIFE)<=0){
  39. Obj_Delete(objBoss);
  40. CloseScript(GetOwnScriptID);
  41. return;
  42. }
  43.  
  44. yield;
  45. }
  46.  
  47. @Finalize{
  48.  
  49. }
  50.  
  51. task TMain{
  52. wait(60);
  53. TFire;
  54. }
  55.  
  56. task TFire{
  57. loop{
  58. CreateShotA1(bossX,bossY,1,90,1,30);
  59. wait(120);
  60. }
  61. }
  62.  
  63. function wait(w){ loop(w){ yield;}}
Advertisement
Add Comment
Please, Sign In to add comment