Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. #TouhouDanmakufu[Plural]
  2. #ScriptVersion[3]
  3. #Title["Koishi Komeji"]
  4. #Text["Koishi is acting up again"]
  5. let objBoss;
  6. let objScene = GetEnemyBossSceneObjectID();
  7. @Initialize{
  8. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  9. ObjEnemy_Regist(objBoss);
  10. ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60); //Move the boss to the specified position
  11. ObjEnemyBossScene_StartSpell(objScene);
  12. TDrawLoop; //Call TDrawLoop, which is defined outside of this block.
  13. //TFinalize;
  14. //MainTask;
  15. }
  16. @Event
  17. {
  18. }
  19. @MainLoop
  20. {
  21. yield;
  22. }
  23. task TPlural
  24. {
  25. let dir = GetCurrentScriptDirectory();
  26. let obj = ObjEnemyBossScene_Create(); // Make the boss scene object
  27.  
  28. // Define Scripts
  29. ObjEnemyBossScene_Add(obj, 0, dir ~ "non01.txt");
  30. ObjEnemyBossScene_Add(obj, 0, dir ~ "spell01.txt");
  31.  
  32. ObjEnemyBossScene_LoadInThread(obj); // Load
  33. ObjEnemyBossScene_Regist(obj); // And register
  34.  
  35. while(!Obj_IsDeleted(obj)){yield}; // yield while the Boss is not deleted
  36. CloseScript(GetOwnScriptID()); // Close if it the boss died
  37. }
  38. task TDrawLoop {
  39. let imgKoishi = GetCurrentScriptDirectory() ~ "Sprites\koishi.png";
  40. ObjPrim_SetTexture(objBoss, imgKoishi);
  41. ObjSprite2D_SetSourceRect(objBoss, 64, 1, 127, 64);
  42. ObjSprite2D_SetDestCenter(objBoss);
  43. }function GetCenterX(){
  44. return GetStgFrameWidth() / 2;
  45. }
  46. function GetCenterY(){
  47. return GetStgFrameHeight() / 2;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement